Created
July 7, 2016 21:57
-
-
Save mitchellporter/fbde3f46c18e6958ad384b211f47d345 to your computer and use it in GitHub Desktop.
audio snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void) audioPCMFrameWasCaptured:(nonnull const AudioStreamBasicDescription *)pcmASBD bufferList:(nonnull const AudioBufferList *)bufferList time:(CMTime)time sampleRate:(Float64)sampleRate { | |
| int16_t *fdata = bufferList->mBuffers[0].mData; | |
| for (int i = 0; i < bufferList->mBuffers[0].mDataByteSize/sizeof(*fdata); i++) { | |
| *fdata = (int16_t)(*fdata * 0.1); | |
| fdata++; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment