16 Nov
2010
16 Nov
'10
7:10 a.m.
On 2010-11-15 13:24, Irfan Shaikh wrote:
err = snd_pcm_mmap_begin(handle,&my_areas,&offset,&frames); mybuffer=(char *)malloc(frames*2); result = fread (mybuffer,1,(frames*2),pFile); my_areas.addr=mybuffer; // IS THIS CORRECT ? WILL THIS WORK ? How can i write my audio file data here in areas? commitres = snd_pcm_mmap_commit(handle, offset, frames);
No, fread should write directly into the buffer given by snd_pcm_mmap_begin, you don't need "mybuffer" at all.
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic