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.
PS2 Note. Only rates of 24000 and 48000 are supported.
PSP Note. Only rates of 22050 and 44100 are supported.
SmartPhone Note. Use 22050 or the operating system may crash outside of the control of fmod.
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.
1024 is the highest number that can be set. Anything higher will return an error.
flags See FSOUND_INIT_FLAGS. Controls some global or initialization time aspects of playback.

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 sometimes be faster than the driver's hardware support!
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube

See Also

FSOUND_Close , FSOUND_File_SetCallbacks , FSOUND_GetCurrentLevels , FSOUND_GetDriverCaps , FSOUND_GetFreeHWRam , FSOUND_GetMaxChannels , FSOUND_GetMemoryStats , FSOUND_GetOutputHandle , FSOUND_GetOutputRate , FSOUND_Init , FSOUND_INIT_FLAGS , FSOUND_PlaySound , FSOUND_PlaySoundEx , FSOUND_SetBufferSize , FSOUND_SetDriver , FSOUND_SetHWND , FSOUND_SetMaxHardwareChannels , FSOUND_SetMemorySystem , FSOUND_SetMinHardwareChannels , FSOUND_SetMixer , FSOUND_SetOutput , FSOUND_SetSpeakerMode , FSOUND_SPU2_Alloc , FSOUND_Stream_Play , sceSifAddCmdHandler

This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Thu Dec 15 17:31:30 2005 by SourceDoc v0.10, the automated source code documenter.