android - audio buffer capture

Skip to first unread message


Jun 27, 2012, 12:51:50 AM6/27/12
i'm a student and doing a project in android .. i have a issue for which i'm hoping for some help from u ppl.

i'm porting ics on panda board. when i play some audio file , i ll get output in a speaker . i want to capture that final data buffer thats going to the hardware and  store it in  a file of mine .

can anyone tel me how i can do that?

my understanding so far is -

i have to modify or write a function in audio_hw_hal.cpp file in ics  source code
in that

static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
                         size_t bytes)
    struct legacy_stream_out *out =
        reinterpret_cast<struct legacy_stream_out *>(stream);
    return out->legacy_out->write(buffer, bytes);

should i copy this write (buffer ) to a file , or something else ?
or if i'm correct, what code should i write and where?

Reply all
Reply to author
0 new messages