![]() |
SPBBytesToMilliseconds |
||||
Header: | Sound.h | Carbon status: | Supported | |
Determines the maximum duration of a recording that can fit in a buffer of a certain size.
OSErr SPBBytesToMilliseconds ( SInt32 inRefNum, SInt32 *byteCount );
The device reference number of the sound input device, as obtained from the SPBOpenDevice function.
A pointer to a value in bytes. On return, the number of milliseconds of recording on the device specified by the inRefNum parameter that would be necessary to fill a buffer of such a size.
A result code.
The SPBBytesToMilliSeconds function reports how many milliseconds of audio data can be recorded in a buffer that is byteCount bytes long, given the input devices current sample rate, sample size, number of channels, and compression factor.
You can call the SPBBytesToMilliSeconds function at interrupt time.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)