iOS Question New AudioRecorder on iMedia library

Giuliano Cucchiarini

Member
Licensed User
Longtime User
Hi

I noticed that now the iMedia library has also an AudioRecorder.

In the documentation for the Initialize there is written:

Initialize(Dir As String, FileName As String, SampleRate As Int, Mono As Boolean, Encoding As Int, MPEG4 As Boolean)

What is 'Encoding as int'? I could not find any explanation in the documentation.

Thank you

Giuliano C.
 

daniel69

Member
Licensed User
Longtime User
Is there any way to read the microphone buffer? Actually in B4A I use the AudioStreamer (I get the buffer content with the RecordBuffer event and there is no need to save the data on a file)
 
Upvote 0

daniel69

Member
Licensed User
Longtime User
Hi Erel, thank you for you reply! I've got to port to iOS an app that uses the mic data in real time ... write and read on a file I think it will come out to be too slow .. I've got less than 10 milliseconds to read the data, process it (heavy calculations with FFT and some digital filters) , and display the info on a graph... Any way out? Any way to to use the audiounit iOS API from B4i? Maybe using an objective-c class with nativeobject?
 
Upvote 0

daniel69

Member
Licensed User
Longtime User
Thaks Erel ... When I start the porting I'll try to write the mic buffer to a temporary file ... I'll try to record a PCM file from the mic for some milliseconds (using audiorecorder in imedia library and a timer ) and then read it using the OpenInput inputstream (by the way, are PCM bytes saved in littleEndian or bigEndian ?) and process it ...
 
Last edited:
Upvote 0

daniel69

Member
Licensed User
Longtime User
Hi Erel! Any news about reading the microphone buffer? Now I still have to read a temporary file (slow processing) ...
 
Upvote 0

joop

Active Member
Licensed User
Longtime User
@tigrot

I am also very interested in this library :
- write the mic to a buffer
- do something with the data in this buffer
- send this buffer to the speaker.

Joop
 
Upvote 0

daniel69

Member
Licensed User
Longtime User
Hi @tigrot .... sorry for the delay ... I've been busy ... my requirement is to read the audio buffer in the same way that is possible in Android with the AudioStreamer library ...
 
Upvote 0
Top