Paolodc
Member
I tried this example:
www.b4x.com
I didn't modify anything in it but when I press "btnStartRecording" the app shows me a Msgbox telling me that I can't use an uninitialized object. This is mistake:
How I can resolve it?
Audio library v1.5 - New AudioStreamer object
This version includes a new AudioStreamer type. Note that this is a beta version (for this type only). The purpose of AudioStreamer is to make it simple to stream audio from the microphone and to the speakers. Internally it is based on AudioTrack and AudioRecord. Next week I plan to create an...
I didn't modify anything in it but when I press "btnStartRecording" the app shows me a Msgbox telling me that I can't use an uninitialized object. This is mistake:
Error:
Logger connesso a: HUAWEI COL-L29
--------- beginning of system
--------- beginning of main
PlaybackComplete
PlaybackComplete
main_btnstartrecording_click (java line: 403)
java.lang.IllegalStateException: stop() called on an uninitialized AudioRecord.
at android.media.AudioRecord.stop(AudioRecord.java:1108)
at anywheresoftware.b4a.audio.AudioStreamer.StopRecording(AudioStreamer.java:110)
at anywheresoftware.b4a.audio.AudioStreamer.StartRecording(AudioStreamer.java:95)
at b4a.example.main._btnstartrecording_click(main.java:403)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:6663)
at android.view.View.performClickInternal(View.java:6635)
at android.view.View.access$3100(View.java:794)
at android.view.View$PerformClick.run(View.java:26199)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
java.lang.IllegalStateException: stop() called on an uninitialized AudioRecord.
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
How I can resolve it?