4

does anybody know how to modify the buffer contents of an AVAudioPCMBuffer object? I want to do the following:

  1. load an audio file into an AVAudioPCMBuffer - this works.
  2. modify the samples data of the AVAudioPCMBuffer. - here i stuck
  3. 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!!!

nik
  • 181
  • 1
  • 6

0 Answers0