• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AudioBuffer question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioBuffer question


  • Subject: AudioBuffer question
  • From: Jeff LaMarche <email@hidden>
  • Date: Wed, 18 Jun 2008 10:53:50 -0400

I've got a large buffer of data (a void *) that I've captured from the selected input device (it is unmodified no AUs applied, just raw data from the HAL), and I now want to write this out to a file using ExtAudioFileWriteAsync. I worked through my problems opening the file and setting the client format, and now am ready to actually write the data to the file. In order to do that, it appears that I have to get the data back into an audio buffer list, so I've tried this:

int numFrames = bufferSize / inFormat.mBytesPerFrame;
AudioBufferList outBufferList;
AudioBuffer outBuffer[1];
outBuffer[0].mNumberChannels = 1;
outBuffer[0].mDataByteSize = bufferSize;
outBuffer[0].mData = soundBuffer;
outBufferList.mNumberBuffers = 1;
outBufferList.mBuffers = outBuffer;  <----- THIS LINE ERRORS OUT


err = ExtAudioFileWriteAsync(outputFile, numFrames, &outBufferList);

I get an incompatible types in assignment error when I try to assign outBuffer to outBufferList.mBuffers, even though both are AudioBuffer arrays. Does anyone know why I can't make this assignment and/or am I going about this the wrong way?

Thanks,
Jeff
 _______________________________________________
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

  • Follow-Ups:
    • Re: AudioBuffer question
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: Re: ID3v2 tags
  • Next by Date: Re: ExtAudioFileSetProperty
  • Previous by thread: Re: ID3v2 tags
  • Next by thread: Re: AudioBuffer question
  • Index(es):
    • Date
    • Thread