Previous Topic Index Next Topic
[API function]

FSOUND_3D_Listener_SetCurrent

Sets the current listener number and number of listeners, if the user wants to simulate multiple listeners at once.
This is usually for the case in a game where there is a splitscreen and multiple players playing the game at once.

void F_API FSOUND_3D_Listener_SetCurrent(
int current,
int numlisteners
);

Parameters

current Current listener number. Listener commands following this function call will affect this listener number. (default: 0)
numlisteners Number of listeners active. (default: 1)

Return Value

void

Remarks

Only affects FSOUND_3D_Listener_SetAttributes and FSOUND_3D_Listener_GetAttributes.
Setting more than 1 listener will turn off doppler and cause all panning to be ignored and 3d sound will come from the center (mono).
-------------
For WIN32 FSOUND_HW3D based sounds, channels must have their attributes set after this function is called, otherwise unexpected audible results may occur.
For example you cannot update your channels with FSOUND_3D_SetAttributes, call FSOUND_3D_Listener_SetCurrent, and then call FSOUND_Update and expect all the voices to update correctly.
The correct order is to call FSOUND_3D_Listener_SetCurrent first, then update all channels with FSOUND_3D_SetAttributes, then call FSOUND_Update.
This is due to DirectSound not supporting multiple listeners, so FMOD has to do inverse transforms on the positions to simulate it with one listener, at the time FSOUND_3D_SetAttributes is called.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube

See Also

FSOUND_3D_Listener_GetAttributes , FSOUND_3D_Listener_SetAttributes , FSOUND_3D_Listener_SetCurrent , FSOUND_3D_SetAttributes , FSOUND_Update

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