• 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
Write IEEE float data to buffer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Write IEEE float data to buffer


  • Subject: Write IEEE float data to buffer
  • From: Hari Seldon <email@hidden>
  • Date: Tue, 01 Aug 2006 13:49:42 -0400


I'm new to programming in xcode, but am really interested in working on the mac. I'm trying to write audio data to a buffer for playback. I normally work on a DirectSound model; where there is a manager that creates a sound buffer, I write IEEE float data to the buffer and directsound plays it. In that case it's up to me to allocate the buffer, and ensure the correct lock/unlock model so that data is written correctly.


I'm finding the documentation on CoreAudio a little harder to follow, but the main idea I'm seeing is that (from DefaultOutputUnit example, and others):
- I'd have to open the default audio unit and initialize it
- create a mixer (to mix multiple buffers for playback)
- get some sort of audio unit that represents a buffer


The only problem i've encountered from the examples I've seen so far is that they all use a callback for writing data. Is it possible to change the model and only write new audio data when I request it, rather than being told when to write? I'm trying to match the DirectSound model as much as I can. I realize there are workarounds I can do (carry and internal queue of data to write when the callback asks, etc), but I'd really prefer to match the models as much as possible. Any suggestions?

Also from the examples I've seen, different channel audio are written to different buffers. If I just have a single stream of decoded IEEE wave data, is it possible to write this to a single buffer, where the buffer knows how to separate the data for playback?

Hopefully these are fairly straightforward, and I can get the coding models somewhat close.

Thanks
_______________________________________________
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: Write IEEE float data to buffer
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Re: audio stops after user switch
  • Next by Date: Re: Write IEEE float data to buffer
  • Previous by thread: Re: Encoding Mono IMA4
  • Next by thread: Re: Write IEEE float data to buffer
  • Index(es):
    • Date
    • Thread