Important: Inside Macintosh: Sound is deprecated as of Mac OS X v10.5. For new audio development in Mac OS X, use Core Audio. See the Audio page in the ADC Reference Library.
SndPlayDoubleBuffer
TheSndPlayDoubleBuffer
function is a low-level routine that gives you maximum efficiency and control over double buffering while still maintaining compatibility with the Sound Manager.
FUNCTION SndPlayDoubleBuffer (chan: SndChannelPtr; theParams: SndDoubleBufferHeaderPtr): OSErr;
chan
- A pointer to a valid sound channel.
theParams
- A pointer to a sound double buffer header record.
DESCRIPTION
TheSndPlayDoubleBuffer
function launches a low-level sound play using the information in the double buffer header record specified bytheParams
. After your application calls this function, the Sound Manager repeatedly calls the doubleback procedure you specify in the double buffer header record. The doubleback procedure then manages the filling of buffers of sound data from disk whenever one of the two buffers specified in the double buffer header record becomes exhausted.SPECIAL CONSIDERATIONS
Because theSndPlayDoubleBuffer
function might move memory, you should not call it at interrupt time.You can use the
SndPlayDoubleBuffer
function only on a Macintosh computer that supports the play-from-disk routines. For information on how to determine whether a computer supports these routines, see "Testing for Multichannel Sound and Play-From-Disk Capabilities" on page 2-35.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSndPlayDoubleBuffer
function are
Trap macro Selector _SoundDispatch $00200008 RESULT CODES
noErr 0 No error badChannel -205 Channel is corrupt or unusable SEE ALSO
For information on the format of a doubleback procedure, see "Doubleback Procedures" on page 2-153.