Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Version: 1.0

Posted: 2003-03-14

Build Requirements: N/A

Runtime Requirements: Carbon

View Source Code:

Download Sample (“SndPlayDoubleBuffer.zip”, 185.7K)
Download Sample (“SndPlayDoubleBuffer.dmg”, 253.5K)



Description

The primary purpose of this sample code is to show developers how to use SndPlayDoubleBuffer to play AIFF, WAVE, and .au files asynchronously from disk. To this end this sample can be used to show you how to: 1) parse an AIFF, 'snd ' resource, WAVE, or .au header 2) use PBReadAsync() at interrupt time 3) munge AIFF, WAVE, and .au data into a form the Sound Manager can play 4) set up the sound header to play compressed and uncompressed sounds 5) instantly (well, really quickly) pause a sound 6) stop a sound so you can play from some other part of the sound 7) make it sound like you are playing a sound backwards 8) use completion routines 9) have fun with sounds Requires: Code Warrior Pro 5 (to open the project file), a Mac that's fast enough to play sound from disk. Keywords: sound, play, doublebuffer, SndPlayDoubleBuffer, compress

Document Revision History

Date Notes
2003-03-14First Version

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.