• 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
Re: Playing wave file data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Playing wave file data


  • Subject: Re: Playing wave file data
  • From: William Stewart <email@hidden>
  • Date: Thu, 16 Oct 2003 14:28:57 -0700

And of course you can create an AudioConverter to do this conversion (to/from int-float, deinterleave, etc)...

Also, I should add that interfacing directly with the I/O Proc for I/O can be alot more work than you actually need to do. The Output Unit will do this interface for you, there is no additional latency, and it will also take a pretty broad range of formats and convert them to the device for you. This gets to be a lot of work with the different kinds of devices that are available on the market, and the output unit hides all of this detail from you.

There's some example code on how to use this in /Developer/Examples/CoreAudio/Services

Bill

On 15/10/2003, at 3:39 PM, Herbie Robinson wrote:

At 4:07 PM -0400 10/15/03, Steve Bird wrote:
--- There *-IS-* some math behind this - don't just make up a number. If it's 16-bit sound, it has a range of -32768..+32767. So divide (using floating-point arithmetic) the sound integers by 32767 to get +/- 1.00000.

Actually, you want to multiply by the constant (1.0 / 32768.0) because multiplies are much much faster than divides and because if you use 32767, you can end up with a sample greater than -1. Another reason to multiply by a power of 2 is because that way you don't mess up any dither that has been added to the 16 bit samples.
-- -*****************************************
** http://www.curbside-recording.com/ **
******************************************
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


-- mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Playing wave file data (From: Steve Bird <email@hidden>)
 >Re: Playing wave file data (From: Herbie Robinson <email@hidden>)

  • Prev by Date: Re: Documentation on AudioToolbox functionality in CoreAudio?
  • Next by Date: Re: Signaling the end of audio conversion
  • Previous by thread: Re: Playing wave file data
  • Next by thread: NULL audio buffers from the HAL during a format change?
  • Index(es):
    • Date
    • Thread