I iCAB Well-Known Member Licensed User Longtime User Feb 16, 2019 #1 Hi All I am using the following code in B4A to record an audio file. Code: Copy Dim AR As AudioRecorder AR.Initialize AR.AudioSource = AR.AS_MIC AR.OutputFormat = AR.OF_THREE_GPP AR.AudioEncoder = AR.AE_AMR_NB AR.setOutputFile(GetTempFolder, FileName) Please note that, before I used the above format, I was using LibLame to encode mp3 and send to android & iOS devices. Now that LibLame is not working properly after upgrading the target SDK, I switched to AudioRecorder. This approach is working great between android devices but I am having problems playing the file on iOS ( Original code using MediaPlayer) Is there a way to play this file in B4I?, if not what is the alternative? Thanks iCAB
Hi All I am using the following code in B4A to record an audio file. Code: Copy Dim AR As AudioRecorder AR.Initialize AR.AudioSource = AR.AS_MIC AR.OutputFormat = AR.OF_THREE_GPP AR.AudioEncoder = AR.AE_AMR_NB AR.setOutputFile(GetTempFolder, FileName) Please note that, before I used the above format, I was using LibLame to encode mp3 and send to android & iOS devices. Now that LibLame is not working properly after upgrading the target SDK, I switched to AudioRecorder. This approach is working great between android devices but I am having problems playing the file on iOS ( Original code using MediaPlayer) Is there a way to play this file in B4I?, if not what is the alternative? Thanks iCAB
Erel B4X founder Staff member Licensed User Longtime User Feb 17, 2019 #2 What happens when you try to play it with MediaPlayer? Upvote 0
I iCAB Well-Known Member Licensed User Longtime User Feb 17, 2019 #3 Erel said: What happens when you try to play it with MediaPlayer? Click to expand... No sound at all Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 18, 2019 #4 Try to change the audio encoder. Upvote 0
I iCAB Well-Known Member Licensed User Longtime User Feb 18, 2019 #5 Erel said: Try to change the audio encoder. Click to expand... Hi Erel,Thanks for your reply! I tried all encoding formats with AR.OF_THREE_GPP. There is no difference. As long as I can find a combination that works with B4A and B4I, then I should be fine. Please suggest Thanks iCAB Upvote 0
Erel said: Try to change the audio encoder. Click to expand... Hi Erel,Thanks for your reply! I tried all encoding formats with AR.OF_THREE_GPP. There is no difference. As long as I can find a combination that works with B4A and B4I, then I should be fine. Please suggest Thanks iCAB
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2019 #6 You can use AudioStreamer and save the audio as a wav file: https://www.b4x.com/android/forum/t...5-new-audiostreamer-object.30550/#post-177599 Upvote 0
You can use AudioStreamer and save the audio as a wav file: https://www.b4x.com/android/forum/t...5-new-audiostreamer-object.30550/#post-177599
I iCAB Well-Known Member Licensed User Longtime User Feb 19, 2019 #7 Erel said: You can use AudioStreamer and save the audio as a wav file: https://www.b4x.com/android/forum/t...5-new-audiostreamer-object.30550/#post-177599 Click to expand... Hi Erel, I am trying to avoid wave files because of the file size. Thanks iCAB Upvote 0
Erel said: You can use AudioStreamer and save the audio as a wav file: https://www.b4x.com/android/forum/t...5-new-audiostreamer-object.30550/#post-177599 Click to expand... Hi Erel, I am trying to avoid wave files because of the file size. Thanks iCAB