Previous Topic Index Next Topic
[API function]

FSOUND_GetCurrentLevels

Returns a left and right VU/Level reading at the current position of the specified channel.
Levels are are only supported for software channels.

DLL_API signed char F_API FSOUND_GetCurrentLevels(
int channel,
F_FLOAT_API *l,
F_FLOAT_API *r
);

Parameters

channel Channel number/handle to retrieve left and right level from.
l Pointer to a floating point value to store left level, between 0 and 1.
r Pointer to a floating point value to store right level, between 0 and 1.

Return Value

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

Remarks

By default this function is only point sampled and not latency adjusted (it will appear to trigger ahead of when you hear the sound).
To fix this and get a 'perfect' set of levels in realtime, use FSOUND_INIT_ACCURATEVULEVELS with FSOUND_Init.
-------------------
To get an overall VU reading for all sounds, add all VU values for each channel together, and then clip at 1.0.
Another (harder) way is to write a dsp unit that reads from the mixbuffer being passed into it.
Note: A true 'VU' should be smoothed, but in case people were after more accuracy than a smoothed value, it was decided to return the raw amplitude, and let the user smooth the result in their own way.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube

See Also

FSOUND_GetAmplitude , FSOUND_Init

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