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.
Sound Double Buffer Records
You must fill in a sound double buffer header record if you wish to manage your own double buffers. ThedbhBufferPtrfield of the sound double buffer header record references two sound double buffer records, which you must also fill out. TheSndDoubleBufferHeaderdata type defines a sound double buffer header.
TYPE SndDoubleBuffer = PACKED RECORD dbNumFrames: LongInt; {number of frames in buffer} dbFlags: LongInt; {buffer status flags} dbUserInfo: ARRAY[0..1] OF LongInt; {for application's use} dbSoundData: PACKED ARRAY[0..0] OF Byte; {array of data} END;The buffer status flags field for each of the two buffers can contain either of these values that your doubleback procedure must set when appropriate:
Field Description
dbNumFrames- The number of frames in the
dbSoundDataarray.dbFlags- Buffer status flags.
dbUserInfo- Two long words into which you can place information that you need to access in your doubleback procedure.
dbSoundData- A variable-length array. You write samples into this array, and the Sound Manager reads samples out of this array.
CONST dbBufferReady = $00000001; dbLastBuffer = $00000004;All other bits in thedbFlagsfield are reserved by Apple; your application should not modify them.