Carbon


SMStatus

Header: Sound.h

struct SMStatus {
    SInt16 smMaxCPULoad; 
    SInt16 smNumChannels; 
    SInt16 smCurCPULoad;
};
typedef SMStatus SMStatusPtr;

Field descriptions

smMaxCPULoad

The maximum CPU load that the Sound Manager will not exceed when allocating channels. The smMaxCPULoad field is set to a default value of 100 when the system starts up.

smNumChannels

The number of sound channels that are currently allocated by all applications. This does not mean that the channels allocated are being used, only that they have been allocated and that CPU loading is being reserved for these channels.

smCurCPULoad

The CPU load that is being taken up by currently allocated channels.

You can use the SndManagerStatus function to get a Sound Manager status structure, which gives information on the current CPU loading caused by all open channels of sound. The SMStatus data type defines a Sound Manager status structure.

Although you can use the information contained in the Sound Manager status structure to determine how many channels are allocated, you should not rely on the information in the smMaxCPULoad or smCurCPULoad field. To determine whether the Sound Manager can create a new channel, simply call the SndNewChannel function, which returns an appropriate result code if it is unable to allocate a new channel.

You should use this data structure only if you need to access this information or to customize sound play.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)