Audio Recording Data Capture



I was writing an application where I will record Audio through Samsung Galaxy Watch. Now the problem is, I can record Audio by recorder_h. But it writes to the file after the recording ends. What I need is I do not need to write it in a file. I need to send the audio data packets to the Android device. to do so I have to have a callback where audio data is capturing. Now, I have tried with

recorder_set_audio_stream_cb(g_recorder, recorder_audio_stream_cb_callback, NULL);


This one gives me all the buffers before writing it to the file. Is there any way where I can get the audio buffer, while I am recording?


Thanks in Advance