Previous Topic Index Next Topic
[API function]

FSOUND_Init

Initializes the FMOD Sound System.

signed char F_API FSOUND_Init(
int mixrate,
int maxsoftwarechannels,
unsigned int flags
);

Parameters

mixrate Output rate in hz between 4000 and 65535. Any thing outside this will cause
the function to fail and return FALSE.
maxchannels Maximum number of SOFTWARE channels available.
The number of HARDWARE channels is autodetected. The total number of
channels available (hardware and software) after initialization can be found
with FSOUND_GetMaxChannels.
Having a large number of maxchannels does not adversely affect cpu
usage, but it means it has the POTENTIAL to mix a large number of
channels, which can have an adverse effect on cpu usage.
flags This is reserved for future expansion. Set it to 0.

Return Value

On success, TRUE is returned.
On failure, FALSE is returned.

Remarks

You do not have control over how many hardware channels are available to you. In a lot of
cases it may be 0 (the sound card does not have the ability to supply hardware channels).
This is why it is usually a good idea to supply FSOUND_Init with a good number of software
channels to fall back onto, for example 32.
Hardware channels are 3D hardware channels only. There is no benefit in supporting hardware
for 2d playback of sound effects. With todays machines and FMOD's superior mixing routines,
FMOD's software engine can be faster than the drivers hardware support!

See Also

FSOUND_CD_Eject , FSOUND_CD_GetPaused , FSOUND_CD_Play , FSOUND_CD_SetPaused , FSOUND_CD_SetPlayMode , FSOUND_CD_Stop , FSOUND_Close , FSOUND_GetDriverCaps , FSOUND_GetMaxChannels , FSOUND_GetOutputHandle , FSOUND_GetOutputRate , FSOUND_Init , FSOUND_INIT_FLAGS , FSOUND_PlaySound , FSOUND_PlaySoundEx , FSOUND_SetBufferSize , FSOUND_SetDriver , FSOUND_SetHWND , FSOUND_SetMaxHardwareChannels , FSOUND_SetMinHardwareChannels , FSOUND_SetMixer , FSOUND_SetOutput , FSOUND_Stream_Play

This document copyright ©Firelight Multimedia, 1999-2001. All rights reserved.
Generated Thu Sep 13 00:18:09 2001 by SourceDoc v0.10, the automated source code documenter.