##### [API function]

## FSOUND_SetBufferSize

Sets the FMOD internal mixing buffer size.
It is configurable because low buffersizes use less memory, but are more instable.
More importantly, increasing buffer size will increase sound output stability, but
on the other hand increases latency, and to some extent, CPU usage.
* FMOD chooses the most optimal size by default for best stability, depending on the
output type - and if the drivers are emulated or not (NT).
It is not recommended changing this value unless you really need to. You may get worse
performance than the default settings chosen by FMOD.

signed char F_API FSOUND_SetBufferSize(
int len_ms
);

### Parameters

len_ms | The buffer size in milliseconds.

### Return Value

On success, TRUE is returned.
On failure, (ie if FMOD is already active) FALSE is returned.

### Remarks

This function cannot be called after FMOD is already activated with FSOUND_Init.
It must be called before FSOUND_Init, or after FSOUND_Close.
---------
The buffersize seting defaults to 50ms if it is not called for DSOUND.
It defaults to 200ms for Windows Multimedia wave-out or for emulated DirectSound drivers (such as NT drivers).
When the output is FSOUND_OUTPUT_ASIO the buffersize is ignored. The buffersize should be configured using the ASIO driver which can be done with the supplied asioconfig.exe in the FMOD SDK.
---------
Buffer sizes lower than 50 are clamped at 50.
Buffer sizes are also rounded DOWN to the nearest multiple of 25. This is because FMOD mixes in blocks of 25ms.
Due to this buffersize command latency on software channels will be between 25 and 50ms on average (37.5ms) when the buffersize is set to 50.
---------
Macintosh, PlayStation 2 and GameCube do not support this as they already achieve minimal latency and are forced to 25ms.
___________________
Supported on the following platforms : Win32, WinCE, Linux, XBox

### See Also

FSOUND_Close , FSOUND_DSP_GetBufferLengthTotal , FSOUND_Init

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