hookshy Well-Known Member Licensed User Longtime User Jul 4, 2014 #1 I have installed the library from this link Audio library v1.5 http://www.b4x.com/android/forum/threads/audio-library-v1-5-new-audiostreamer-object.30550/#content The example seem to work fine but when I put it in to my app here what came out . https://www.dropbox.com/s/bz4idrq8qf7xasn/1.wav If you could give me a hint about what might probably go wrong I could apreciate... I will come back as soon as I find an answer myself . I know this lib is on beta testing so maybe my case would be small help as tester ! Thank you
I have installed the library from this link Audio library v1.5 http://www.b4x.com/android/forum/threads/audio-library-v1-5-new-audiostreamer-object.30550/#content The example seem to work fine but when I put it in to my app here what came out . https://www.dropbox.com/s/bz4idrq8qf7xasn/1.wav If you could give me a hint about what might probably go wrong I could apreciate... I will come back as soon as I find an answer myself . I know this lib is on beta testing so maybe my case would be small help as tester ! Thank you
hookshy Well-Known Member Licensed User Longtime User Jul 4, 2014 #2 Found problem by not copying the right initialise statement and the sample rate got to the crapy effect from the audio file above ! Device I have tested the library motorola defy+ android 2.3.2 Code: Copy streamer.Initialize("streamer", mSampleRate, mMono, mBitRate, streamer.VOLUME_MUSIC) 'streamer.Initialize("streamer", 44100, True, 16, streamer.VOLUME_MUSIC) 'this statement was from previous example :rolleyes: Sometime we make the code do strange things when coding !!! thank you for this library Upvote 0
Found problem by not copying the right initialise statement and the sample rate got to the crapy effect from the audio file above ! Device I have tested the library motorola defy+ android 2.3.2 Code: Copy streamer.Initialize("streamer", mSampleRate, mMono, mBitRate, streamer.VOLUME_MUSIC) 'streamer.Initialize("streamer", 44100, True, 16, streamer.VOLUME_MUSIC) 'this statement was from previous example :rolleyes: Sometime we make the code do strange things when coding !!! thank you for this library
hookshy Well-Known Member Licensed User Longtime User Jul 5, 2014 #3 while playing with example from library and the test I made I have the following errors . On example : error on java line 290 illegalStateException:stop() called on an uninitilised Audiorecord ON my implementation: I can press record but the file I can not play the file error java.io.IOException : Prepared failed: status=0x1 Upvote 0
while playing with example from library and the test I made I have the following errors . On example : error on java line 290 illegalStateException:stop() called on an uninitilised Audiorecord ON my implementation: I can press record but the file I can not play the file error java.io.IOException : Prepared failed: status=0x1
hookshy Well-Known Member Licensed User Longtime User Jul 5, 2014 #4 Fixed problem ... off .. I have wrong handled the button for recording, stop and play . The recorder was started but and never stopped ! Upvote 0
Fixed problem ... off .. I have wrong handled the button for recording, stop and play . The recorder was started but and never stopped !
hookshy Well-Known Member Licensed User Longtime User Jul 5, 2014 #5 NEW PROBLEM on device: Vodafon smart II (No carrier , no sim inserted) Android 2.3.7 320 x 480 px, 3.2 '' (180 ppi ) on line: streamer.Initialize("streamer", mSampleRate, mMono, mBitRate, streamer.VOLUME_MUSIC) Error: NegativeARraySizeException !! Simple try catch end try over streamer intialisation will start the app but surely the recorder function won't work. This device has not SIM inserted are there related in some way ? Upvote 0
NEW PROBLEM on device: Vodafon smart II (No carrier , no sim inserted) Android 2.3.7 320 x 480 px, 3.2 '' (180 ppi ) on line: streamer.Initialize("streamer", mSampleRate, mMono, mBitRate, streamer.VOLUME_MUSIC) Error: NegativeARraySizeException !! Simple try catch end try over streamer intialisation will start the app but surely the recorder function won't work. This device has not SIM inserted are there related in some way ?
Erel B4X founder Staff member Licensed User Longtime User Jul 6, 2014 #6 The latest version of Audio library should raise the Error event in this case. This error means that the device doesn't support these parameters. Upvote 0
The latest version of Audio library should raise the Error event in this case. This error means that the device doesn't support these parameters.
hookshy Well-Known Member Licensed User Longtime User Jul 8, 2014 #7 This error I got on LGOptimus l5 while the app works great on Motorola Defy + Fatal signal 6 (SIGABRT) at 0x00000180 (code=0) Error occured on activity create ! And the message box that give you the option to wait for the app is often showing when creating streamer object . Regarding the parametrers of the streamer it is possible that some configuration to crack on some phones ? Does each device have it one hardware configuration that support more of less more parameter and how can you tell this from the first install of the app? How important is the channel in the streamer initialise and how could you now what channel works ? Upvote 0
This error I got on LGOptimus l5 while the app works great on Motorola Defy + Fatal signal 6 (SIGABRT) at 0x00000180 (code=0) Error occured on activity create ! And the message box that give you the option to wait for the app is often showing when creating streamer object . Regarding the parametrers of the streamer it is possible that some configuration to crack on some phones ? Does each device have it one hardware configuration that support more of less more parameter and how can you tell this from the first install of the app? How important is the channel in the streamer initialise and how could you now what channel works ?
hookshy Well-Known Member Licensed User Longtime User Jul 8, 2014 #8 Because I am handeling both the library example and my test record example i have an error each time when pressing play button to record . (called on an uninitilised Audiorecord) I have restarted the phone in order to catch the problem and after restart the first app that runs is recording just fine . That means that a release must be done before leaving the app is this correct ? I have used this code found here to release the job in activity pause Code: Copy Dim r As Reflector r.Target = streamer r.Target = r.GetField("audioRecord") r.RunMethod("release") I hope I am not wrong actually I used the release option only when userclosed option in activity pause as for example a scaner or voice recognition will not recreate the activity but only pause and resume . Please correct me when I am writing BS. Strange thing is that the app that handles the same hardware resource wrong will cause eventually the crash of the other one .. but the users does not feel that and may tell that your app actually sucks and that is not good .. the problem was same place else! This might be the case of a lot of other hardware resources on android device ! Last edited: Jul 8, 2014 Upvote 0
Because I am handeling both the library example and my test record example i have an error each time when pressing play button to record . (called on an uninitilised Audiorecord) I have restarted the phone in order to catch the problem and after restart the first app that runs is recording just fine . That means that a release must be done before leaving the app is this correct ? I have used this code found here to release the job in activity pause Code: Copy Dim r As Reflector r.Target = streamer r.Target = r.GetField("audioRecord") r.RunMethod("release") I hope I am not wrong actually I used the release option only when userclosed option in activity pause as for example a scaner or voice recognition will not recreate the activity but only pause and resume . Please correct me when I am writing BS. Strange thing is that the app that handles the same hardware resource wrong will cause eventually the crash of the other one .. but the users does not feel that and may tell that your app actually sucks and that is not good .. the problem was same place else! This might be the case of a lot of other hardware resources on android device !
Erel B4X founder Staff member Licensed User Longtime User Jul 8, 2014 #9 Which configuration are you using? You can catch the error and try a different set of configuration parameters. About the channel, Android maintains several volume channels. This setting affect the playback volume level. Your "release" code looks correct. Upvote 0
Which configuration are you using? You can catch the error and try a different set of configuration parameters. About the channel, Android maintains several volume channels. This setting affect the playback volume level. Your "release" code looks correct.
hookshy Well-Known Member Licensed User Longtime User Jul 8, 2014 #10 I did not changed nothing from the lib example As soon as I will catch something I will post error . Thank you ! I have inserted also the lastexception routine ! Code: Copy Private streamer As AudioStreamer Private buffers As List Private timer1 As Timer Private recordingStart As Long Private output As OutputStream Private recording As Boolean Private mBitRate As Int = 16 Private mSampleRate As Int = 22050 Private mMono As Boolean = True Private mFileName As String = "ac.wav" Private mp As MediaPlayer Code: Copy buffers.Initialize streamer.Initialize("streamer", mSampleRate, mMono, mBitRate, streamer.VOLUME_MUSIC) Upvote 0
I did not changed nothing from the lib example As soon as I will catch something I will post error . Thank you ! I have inserted also the lastexception routine ! Code: Copy Private streamer As AudioStreamer Private buffers As List Private timer1 As Timer Private recordingStart As Long Private output As OutputStream Private recording As Boolean Private mBitRate As Int = 16 Private mSampleRate As Int = 22050 Private mMono As Boolean = True Private mFileName As String = "ac.wav" Private mp As MediaPlayer Code: Copy buffers.Initialize streamer.Initialize("streamer", mSampleRate, mMono, mBitRate, streamer.VOLUME_MUSIC)
hookshy Well-Known Member Licensed User Longtime User Jul 9, 2014 #11 I had another crash on Motorola this time, this is what I see in my logs ! I do not know if this helps but I do report any problems I met ! I have restarted app and recorder works fine ! (/Jenkins/jobs/Android-4-3-0-Build-Debug/workspace/make//WebRTC/webrtc/modules/audio_device/android/audiolayer/audioeffect_dyldproxy.cc:147) assertion failure: NULL != thisPtr (/Jenkins/jobs/Android-4-3-0-Build-Debug/workspace/make//WebRTC/webrtc/modules/audio_device/android/audiolayer/audioeffect_dyldproxy.cc:254) assertion failure: DLAudioEffect::_queryDefaultPreProcessing.bound() (/Jenkins/jobs/Android-4-3-0-Build-Debug/workspace/make//WebRTC/webrtc/modules/audio_device/android/audiolayer/audioeffect_dyldproxy.cc:147) assertion failure: NULL != thisPtr (/Jenkins/jobs/Android-4-3-0-Build-Debug/workspace/make//WebRTC/webrtc/modules/audio_device/android/audiolayer/audioeffect_dyldproxy.cc:147) assertion failure: NULL != thisPtr Upvote 0
I had another crash on Motorola this time, this is what I see in my logs ! I do not know if this helps but I do report any problems I met ! I have restarted app and recorder works fine ! (/Jenkins/jobs/Android-4-3-0-Build-Debug/workspace/make//WebRTC/webrtc/modules/audio_device/android/audiolayer/audioeffect_dyldproxy.cc:147) assertion failure: NULL != thisPtr (/Jenkins/jobs/Android-4-3-0-Build-Debug/workspace/make//WebRTC/webrtc/modules/audio_device/android/audiolayer/audioeffect_dyldproxy.cc:254) assertion failure: DLAudioEffect::_queryDefaultPreProcessing.bound() (/Jenkins/jobs/Android-4-3-0-Build-Debug/workspace/make//WebRTC/webrtc/modules/audio_device/android/audiolayer/audioeffect_dyldproxy.cc:147) assertion failure: NULL != thisPtr (/Jenkins/jobs/Android-4-3-0-Build-Debug/workspace/make//WebRTC/webrtc/modules/audio_device/android/audiolayer/audioeffect_dyldproxy.cc:147) assertion failure: NULL != thisPtr
Erel B4X founder Staff member Licensed User Longtime User Jul 10, 2014 #12 Can you post the stack trace when that happens? Upvote 0
hookshy Well-Known Member Licensed User Longtime User Jul 10, 2014 #13 Can you post the stack trace when that happens? Click to expand... I am afraid I do not now how to do that ! Another thing I see : By pressing home button while recording I see the following statement in log . by resuming the recording is resuming again ! sending message to waiting queue (streamer_recordbuffer) Ignoring event (too many queued events: streamer_recordbuffer) Upvote 0
Can you post the stack trace when that happens? Click to expand... I am afraid I do not now how to do that ! Another thing I see : By pressing home button while recording I see the following statement in log . by resuming the recording is resuming again ! sending message to waiting queue (streamer_recordbuffer) Ignoring event (too many queued events: streamer_recordbuffer)
Erel B4X founder Staff member Licensed User Longtime User Jul 10, 2014 #14 This happens because the activity is paused. You should use a service if you want to record while the app is in the background. Upvote 0
This happens because the activity is paused. You should use a service if you want to record while the app is in the background.
hookshy Well-Known Member Licensed User Longtime User Jul 10, 2014 #15 Ok .. I understand .. the purpose is not to record in background but to record simple message in order to share it via what app ... so it is not a problem . Upvote 0
Ok .. I understand .. the purpose is not to record in background but to record simple message in order to share it via what app ... so it is not a problem .