Inside Macintosh: Sound
| Previous | Chapter contents | Chapter top | Section top | Next |
Important: Sound Input Manager 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.
You must fill in a sound double buffer header record if you wish to manage your own double buffers. The dbhBufferPtr field of the sound double buffer header record references two sound double buffer records, which you must also fill out. The SndDoubleBufferHeader data 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 number of frames in the dbSoundData array.
Buffer status flags.
Two long words into which you can place information that you need to access in your doubleback procedure.
A variable-length array. You write samples into this array, and the Sound Manager reads samples out of this array.
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:
CONST
dbBufferReady = $00000001;
dbLastBuffer = $00000004;
All other bits in the dbFlags field are reserved by Apple; your application should not modify them.
Inside Macintosh: Sound
| Previous | Chapter contents | Chapter top | Section top | Next |
Important: Sound Input Manager 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.