Giter Club home page Giter Club logo

waveform-android's People

Contributors

anna-stepien avatar solitaire avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waveform-android's Issues

Crash on short WAV files

Hi.

I found an issue that when trying to create CheapSoundFile object for short WAV file it crashes.
It happened for WAV files with duration 5 and 20 seconds.

Here is the stack trace:

java.lang.ArrayIndexOutOfBoundsException: length=1024; index=1024 at com.semantive.waveformandroid.waveform.soundfile.WavFile.readFramesInternal(WavFile.java:276) at com.semantive.waveformandroid.waveform.soundfile.WavFile.readFrames(WavFile.java:266) at com.semantive.waveformandroid.waveform.soundfile.CheapWAV.ReadFile(CheapWAV.java:103) at com.semantive.waveformandroid.waveform.soundfile.CheapSoundFile.create(CheapSoundFile.java:100) at com.appunite.zumba.view.playlist.addsoundeffect.SoundEffectActivity.onCreate(SoundEffectActivity.java:118) at android.app.Activity.performCreate(Activity.java:6682) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6121) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

Unable to read .AAC file in CheapAAC

Hey,
I know its not actively maintained but i was trying the code to work for .aac file, But somehow the expected header and first 8 bits of stream does not match.
It throws an IOException of java.io.IOException("Unknown file format");
I am unable to enter this condition in CheapAAC class.
if (header[0] == 0 && header[4] == 'f' && header[5] == 't' && header[6] == 'y' && header[7] == 'p')
I have tried logging my header values and they are as follows :
header[0] : -1 header[1] : -7 header[2] : 80 header[3] : -128 header[4] : 28 header[5] : -65 header[6] : -4 header[7] : -125

I have no idea how the header should be for .AAC files, any guidance regarding this would be very helpful.

zoom

how to close zoom ? i want waveform all in screen , do not need move waveform

Crashes the activity on screen rotation

It seems like the fragment doesn't restore the file name properly when instance state is created. I have tried to extend the custom fragment to gracefully save and restore the filename in the instance state but the problem is somewhere deeper in the library. Does anyone had the same issue?

Any solution?

Only noise from speaker

I've tried implementing it using my ZTE Axon 7 running Android 7.1.
Sfter it successfuly created the waveform (as I understood), trying to play it causes only noise from the speaker.

path to your audio file

/**
* Provide path to your audio file.
*
* @return
*/
@OverRide
protected String getFileName() {
return "path to your audio file";
}

What is the need to fill in the audio file path here? Please give an example? I filled in /storage/emulated/0/Download/test.wav and still can't find the file (provided this path has this file)

Fails to play and display the waveform for .wav files

10-20 08:42:20.797 154-23476/? E/MtkOmxAudioDecBase: MtkOmxAudioDecBase:SetParameter unsupported nParamIndex(0x7F00001E) 10-20 08:42:20.808 154-23476/? E/OMXCodec: @@ [OUT] def.nBufferSize = 65536 10-20 08:42:20.808 154-23476/? E/OMXCodec: @@ [OUT] totalSize = 590336 10-20 08:42:20.876 23459-23475/? E/WaveformFragment: Error while loading sound file java.lang.ArrayIndexOutOfBoundsException: length=65536; index=65536 at com.semantive.waveformandroid.waveform.soundfile.WavFile.readFramesInternal(WavFile.java:274) at com.semantive.waveformandroid.waveform.soundfile.WavFile.readFrames(WavFile.java:265) at com.semantive.waveformandroid.waveform.soundfile.CheapWAV.ReadFile(CheapWAV.java:104) at com.semantive.waveformandroid.waveform.soundfile.CheapSoundFile.create(CheapSoundFile.java:100) at com.semantive.waveformandroid.waveform.WaveformFragment$2.run(WaveformFragment.java:445) 10-20 08:42:20.975 23459-23459/? E/MediaPlayer: Should have subtitle controller already set

The waveform doesn't repeat/replay

The waveform once played cannot be repeated or replayed.
I am using Android Studio 1.2.2 / Mac OSX 10.10.3 / GenyMotion Emulator Nexus 5 with Lollipop build.

Audio Duration from Audio Player and WaveFormView not matched

I facing one small issue.,
Same audio I was loaded into AudioPlayer as well as waveform view
Both classes return an audioDuration for example

int audioDuration = AudioPlayer.getDuration(); //Example value:15935
int mPlayEndMsec = mWaveformView.pixelsToMillisecs(mEndPos) //Example value: 15900

So, I can't identify the user select the exact end position of the audio because selected Value (mPlayEndMsec ) not matched with actual value (audioDuration ). Is there any workaround is there? Please guide me with some solution.

Just display a WaveformView

I just want to display a WaveformView, not attached to playing a file.

I call

CheapSoundFile file = null;
        try
        {
            file = CheapSoundFile.create("/sdcard/malo.m4a", new CheapSoundFile.ProgressListener()
            {
                @Override
                public boolean reportProgress(double v)
                {
                    return true;
                }
            } );
        } catch (IOException e)
        {
            e.printStackTrace();
        }

        if (file != null) waveFormView.setSoundFile(file);

And it spins endlessly, somewhere in WaveFormView.onDraw();

What else do I have to do here?

java.io.IOException: Went over by 7 bytes

Hello!
Can you please suggest me what can i do with "Went over 7 bytes" exception? One of my test devices always trows it at CheapAAC.parseMp4(CheapAAC.java:285). It's always "7" bytes for every m4a file that i try to use. How can i solve it?

Thanks.
Serge.

How to get path for music?

Hello,

May I ask what the correct way is to give the path of an .mp3 music file on SD card for function getFileName() ?

@Override
        protected String getFileName() {
            return "path to your audio file";
}

I tried several ways, but I always get java.io.FileNotFoundException. I use a KitKat based phone for testing.
device-2017-03-26-164300

Any help would be appreciated! Thank you in advance!

Regards,

Daniel

Can't run the app

I am trying to compile the application but it keeps on giving me the same error.

Information:Gradle tasks [:app:assembleDebug]
plugin name 'retrolambda' is deprecated and will be removed in the next release, please change to 'me.tatarka.retrolambda'
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72200Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42200Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava
:app:patchAndroidJar FAILED
Error:Execution failed for task ':app:patchAndroidJar'.

Retrolambda: null/jre/lib/rt.jar does not exist, make sure that the environment variable JAVA_HOME or JAVA8_HOME, or the gradle property retrolambda.jdk points to a valid version of java8.

Please provide an issue for it.
Thank you!

Failed to resolve

Unable to add in my android project please do solve it as soon as possible

how to implement waveformzoomin

i've currently got a button which is supposed to zoom in on the waveform as required.
but as i press the button and call the waveformZoomIn() method, nothing seems to be happening.

any suggestions

project Gradle

my gradle is compileSdkVersion 23
buildToolsVersion "23.0.1" then error accour

:library:compileReleaseJavaWithJavac'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.