Functions


Allocating and Releasing Sound Channels

SndDisposeChannel Releases the memory allocated by calling the SndNewChannel function.
SndNewChannel Allocates a new sound channel.

Compressing and Expanding Audio Data

Comp3to1 Compresses sound data at a ratio of 3:1.
Comp6to1 Compresses sound data at a ratio of 6:1.
Exp1to3 Expands a buffer of sound samples you previously have compressed with the Comp3to1 function.
Exp1to6 Expands a buffer of sound samples you previously have compressed with the Comp6to1 function.

Constructing Sound Resource and File Headers

SetupAIFFHeader Sets up a file that can subsequently be played by SndStartFilePlay.
SetupSndHeader Constructs a sound resource containing sampled sound that can be passed to the SndPlay function.

Controlling Volume Levels

GetDefaultOutputVolume Determines the default volume of a sound output device.
GetSysBeepVolume Determines the current volume of the system alert sound.
SetDefaultOutputVolume Sets the default volume of a sound output device.
SetSysBeepVolume Sets the current volume of the system alert sound.

Converting Between Milliseconds and Bytes

SPBBytesToMilliseconds Determines the maximum duration of a recording that can fit in a buffer of a certain size.
SPBMillisecondsToBytes Determines how many bytes a recording of a certain duration will use.

Creating and Removing Audio Sources

SoundComponentAddSource Adds a new sound source.
SoundComponentRemoveSource Removes the existing sound source specified by the sourceID parameter.

Getting and Setting Sound Component Information

SoundComponentGetInfo Obtains information about the capabilities of your component. A sound component must implement the SoundComponentGetInfo function.
SoundComponentSetInfo Modifies settings of your component. A sound component must implement the SoundComponentSetInfo function.

Linking Modifiers to Sound Channels

SndAddModifier Links modifiers to sound channels.

Managing Double Buffers

SndPlayDoubleBuffer Provides maximum efficiency and control over double buffering while still maintaining compatibility with the Sound Manager.

Managing Sound Components

SoundComponentGetSource Determines your component’s source component.
SoundComponentGetSourceData Generates more data. A utility component must implement the SoundComponentGetSourceData function.
SoundComponentInitOutputDevice Allows a sound output device component to configure any associated hardware devices. A sound output device component must implement the SoundComponentInitOutputDevice function.
SoundComponentSetOutput Specifies the kind of audio data the output device component wants to receive.
SoundComponentSetSource Identifies your component’s source component.

Managing Source Data

SoundComponentPauseSource Pauses the playing of sounds in one or more sound channels. A sound output device component must implement the SoundComponentPauseSource function.
SoundComponentPlaySourceBuffer Starts a new sound playing. A sound output device component must implement the SoundComponentPlaySourceBuffer function.
SoundComponentStartSource Starts playing sounds in one or more sound channels. A sound output device component must implement the SoundComponentStartSource function.
SoundComponentStopSource Stops playing sounds in one or more sound channels. A sound output device component must implement the SoundComponentStopSource function.

Manipulating Device Settings

SPBGetDeviceInfo Obtains information about the settings of a sound input device.
SPBSetDeviceInfo Sets information in a sound input device.

Obtaining Information

GetSoundHeaderOffset Gets the offset from the beginning of a sound resource to the embedded sound header.
MACEVersion Determines the version of the MACE tools available on a machine.
SPBVersion Determines the version of the sound input tools available on a machine.
SndChannelStatus Determines the status of a sound channel.
SndControl Obtains information about a sound data type.
SndGetSysBeepState Determines if the system alert sound is enabled.
SndManagerStatus Determines information about all sound channels currently allocated.
SndSetSysBeepState Sets the state of the system alert sound.
SndSoundManagerVersion Determines the version of the Sound Manager tools available on a computer.

Opening and Closing Sound Input Devices

SPBCloseDevice Closes a sound input device.
SPBOpenDevice Opens a sound input device.

Opening and Closing the Apple Mixer Component

CloseMixerSoundComponent Closes the Apple Mixer. Intended for use only by sound output components.
OpenMixerSoundComponent Opens and connects a sound output device component to the Apple Mixer component. Intended for use only by sound output components.

Playing From Disk

SndPauseFilePlay Toggles the state of a play from disk in progress, just as you might use the pause button on an audio cassette tape player to temporarily pause and then resume play.
SndStartFilePlay Initiates a play from disk.
SndStopFilePlay Stops an asynchronous play from disk.

Playing Sound Resources

SndPlay Plays a sound resource that your application has loaded into memory.
SysBeep Plays the system alert sound.

Recording Sounds Directly From Sound Input Devices

SPBGetRecordingStatus Obtains recording status information about a sound input device.
SPBPauseRecording Pauses a recording from a sound input device.
SPBRecord Records audio data into memory, either synchronously or asynchronously.
SPBRecordToFile Records audio data into a file, either synchronously or asynchronously.
SPBResumeRecording Resumes recording from a sound input device.
SPBStopRecording Ends a recording from a sound input device.

Recording Sounds

SndRecord Records sound resources into memory.
SndRecordToFile Records sound data into a file.

Registering Sound Input Devices

SPBGetIndexedDevice Generates a list of sound input devices.
SPBSignInDevice Registers a sound input device.
SPBSignOutDevice Cancels the registration of a device you have previously registered with the SPBSignInDevice function.

Saving and Restoring Sound Component Preferences

GetSoundPreference Retrieves a block of preferences data you previously saved by calling SetSoundPreference. Intended for use only by sound components.
SetSoundPreference Sets the sound preferences. Intended for use only by sound components.

Sending Commands to a Sound Channel

SndDoCommand Queues a command in a sound channel.
SndDoImmediate Places a sound command in front of a sound channel’s command queue.

Miscellaneous

AudioGetBass
AudioGetInfo
AudioGetMute
AudioGetOutputDevice
AudioGetTreble
AudioGetVolume
AudioMuteOnEvent
AudioSetBass
AudioSetMute
AudioSetToDefaults
AudioSetTreble
AudioSetVolume
CallFilePlayCompletionProc
CallSICCompletionProc
CallSICompletionProc
CallSIInterruptProc
CallSndCallBackProc
CallSndDoubleBackProc
CallSoundParamProc
DisposeFilePlayCompletionUPP
DisposeSICCompletionUPP
DisposeSICompletionUPP
DisposeSIInterruptUPP
DisposeSndCallBackUPP
DisposeSndDoubleBackUPP
DisposeSoundConverterFillBufferDataUPP
DisposeSoundParamUPP
GetCompressionInfo
GetCompressionName
GetSoundOutputInfo
GetSoundVol
InvokeFilePlayCompletionUPP
InvokeSICCompletionUPP
InvokeSICompletionUPP
InvokeSIInterruptUPP
InvokeSndCallBackUPP
InvokeSndDoubleBackUPP
InvokeSoundConverterFillBufferDataUPP
InvokeSoundParamUPP
NewFilePlayCompletionUPP
NewSICCompletionUPP
NewSICompletionUPP
NewSIInterruptUPP
NewSndCallBackUPP
NewSndDoubleBackUPP
NewSoundConverterFillBufferDataUPP
NewSoundParamUPP
ParseAIFFHeader
ParseSndHeader
SetSoundOutputInfo
SetSoundVol
SndDispVersion
SndGetInfo
SndInputGetDeviceInfo
SndInputGetStatus
SndInputInitHardware
SndInputPauseRecording
SndInputReadAsync
SndInputReadSync
SndInputResumeRecording
SndInputSetDeviceInfo
SndInputStopRecording
SndSetInfo
SoundConverterBeginConversion
SoundConverterClose
SoundConverterConvertBuffer
SoundConverterEndConversion
SoundConverterFillBuffer
SoundConverterGetBufferSizes
SoundConverterGetInfo
SoundConverterOpen
SoundConverterSetInfo
SoundManagerGetInfo
SoundManagerSetInfo
UnsignedFixedMulDiv

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