does anybody know how to modify the buffer contents of an AVAudioPCMBuffer object? I want to do the following:
- load an audio file into an AVAudioPCMBuffer - this works.
- modify the samples data of the AVAudioPCMBuffer. - here i stuck
- write the AVAudioPCMBuffer to a file - this also works.
as in the documentation layed out, the AVAudioPCMBuffer.floatChannelData is unfortunately read-only. Also the itAudio.audioBufferList.memory.mBuffers.mData seems to be read-only. the compiler shows: cannot assign through subscript: subscript is get-only. currently i am using the audiotoolbox, which works fine for my purposes. nevertheless i would like to ask if anybody knows the (best practice) way for doing this job? thanks a lot for any help!!!