converting audio signal to buffer value
converting audio signal to buffer value
- Subject: converting audio signal to buffer value
- From: Roland Silver <email@hidden>
- Date: Wed, 26 Mar 2008 16:45:41 -0600
If I have an audio signal as a double in the range -1.0 to 1.0, what is the proper way to convert it to an integer (SInt16?) as a value to be entered into an audio buffer?
I tried this, but it resulted in horrible distortion: ((SInt16*)((&(ioData->mBuffers[0]))->mData))[k] = (SInt16)(signal * 32768.0 + 0.5);
|
_______________________________________________
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