Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting error "only supports bitsPerSample 8 or 16"
    primarykey
    data
    text
    <p>I want to compare two audio file, so for this I'm using library <a href="https://code.google.com/p/musicg/" rel="nofollow">musicg</a>. but i'm getting an error "WaveHeader: only supports bitsPerSample 8 or 16"</p> <p>Code :</p> <pre><code>String root = getExternalFilesDir(null).toString(); Log.i(TAG, root); String bell1 = "bell1.wav"; String bell2 = "DOORBELL-3_SPLITTED.wav"; String fullPath1 = root + File.separator + bell1; String fullPath2 = root + File.separator + bell2; Log.i(TAG, "Full Path 1: " + fullPath1); Log.i(TAG, "Full Path 2: " + fullPath2); File f = new File(fullPath2); Log.i(TAG, "" + f.canRead()); Wave b1 = new Wave(fullPath1); Wave b2 = new Wave(fullPath2); </code></pre> <p>and i'm getting following error.</p> <p>StackTrace :</p> <pre><code>11-25 00:17:08.597: I/MainActivity(26472): /storage/sdcard0/Android/data/com.musicg.demo.android/files 11-25 00:17:08.597: I/MainActivity(26472): Full Path 1: /storage/sdcard0/Android/data/com.musicg.demo.android/files/bell1.wav 11-25 00:17:08.597: I/MainActivity(26472): Full Path 2: /storage/sdcard0/Android/data/com.musicg.demo.android/files/DOORBELL-3_SPLITTED.wav 11-25 00:17:08.597: I/MainActivity(26472): true 11-25 00:17:08.602: W/System.err(26472): WaveHeader: only supports bitsPerSample 8 or 16 11-25 00:17:08.602: W/System.err(26472): Invalid Wave Header 11-25 00:17:08.602: I/MainActivity(26472): Length : 0.25 11-25 00:17:08.602: I/MainActivity(26472): Size : 48001 11-25 00:17:08.602: I/MainActivity(26472): Length : NaN 11-25 00:17:08.602: D/AndroidRuntime(26472): Shutting down VM 11-25 00:17:08.602: W/dalvikvm(26472): threadid=1: thread exiting with uncaught exception (group=0x41e542a0) 11-25 00:17:08.612: E/AndroidRuntime(26472): FATAL EXCEPTION: main 11-25 00:17:08.612: E/AndroidRuntime(26472): java.lang.NullPointerException 11-25 00:17:08.612: E/AndroidRuntime(26472): at com.musicg.wave.Wave.size(Wave.java:255) 11-25 00:17:08.612: E/AndroidRuntime(26472): at com.musicg.demo.android.MainActivity$ClickEvent.onClick(MainActivity.java:139) 11-25 00:17:08.612: E/AndroidRuntime(26472): at android.view.View.performClick(View.java:4261) 11-25 00:17:08.612: E/AndroidRuntime(26472): at android.view.View$PerformClick.run(View.java:17356) 11-25 00:17:08.612: E/AndroidRuntime(26472): at android.os.Handler.handleCallback(Handler.java:615) 11-25 00:17:08.612: E/AndroidRuntime(26472): at android.os.Handler.dispatchMessage(Handler.java:92) 11-25 00:17:08.612: E/AndroidRuntime(26472): at android.os.Looper.loop(Looper.java:137) 11-25 00:17:08.612: E/AndroidRuntime(26472): at android.app.ActivityThread.main(ActivityThread.java:4921) 11-25 00:17:08.612: E/AndroidRuntime(26472): at java.lang.reflect.Method.invokeNative(Native Method) 11-25 00:17:08.612: E/AndroidRuntime(26472): at java.lang.reflect.Method.invoke(Method.java:511) 11-25 00:17:08.612: E/AndroidRuntime(26472): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) 11-25 00:17:08.612: E/AndroidRuntime(26472): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) 11-25 00:17:08.612: E/AndroidRuntime(26472): at dalvik.system.NativeStart.main(Native Method) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload