Why setting mData in render callback doesn't work, but memcpy does?
Why setting mData in render callback doesn't work, but memcpy does?
- Subject: Why setting mData in render callback doesn't work, but memcpy does?
- From: Baoshan Sheng <email@hidden>
- Date: Thu, 15 Dec 2016 02:39:35 +0800
In my audio output prototype, replace below line in the IOProc
memcpy(outOutputData->mBuffers[0].mData, pcm, outOutputData->mBuffers[0].mDataByteSize);
with
outOutputData->mBuffers[0].mData = pcm;
Will lead to digital silence. I have no idea why. The pcm buffer is globally alloced and never freed.
Does that means the caller of the IOProc expects the buffer be filled, rather than the pointer be replaced?
Any help would be appreciated.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden