Channel::set3DSpread

FMOD Studio API

Firelight Technologies FMOD Studio API

Channel::set3DSpread

Sets the spread of a 3D sound in speaker space.

C++ Syntax

FMOD_RESULT Channel::set3DSpread(
  float angle
);

C Syntax

FMOD_RESULT FMOD_Channel_Set3DSpread(
  FMOD_CHANNEL *channel,
  float angle
);

C# Syntax

RESULT Channel.set3DSpread(
  float angle
);

JavaScript Syntax

Channel.set3DSpread(
  angle                            
);

Parameters

angle
Speaker spread angle. 0 = all sound channels are located at the same speaker location and is 'mono'. 360 = all sound channels are located at the opposite speaker location to the speaker location that it should be according to 3D position. Default = 0.

Return Values

If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.

Remarks

Normally a 3D sound is aimed at one position in a speaker array depending on the 3D position to give it direction. Left and right parts of a stereo sound for example are consequently summed together and become 'mono'. When increasing the 'spread' of a sound, the left and right parts of a stereo sound rotate away from their original position, to give it more 'stereoness'. The rotation of the sound channels are done in 'speaker space'.

Multichannel sounds with channel counts greater than stereo have their sub-channels spread evently through the specified angle. For example a 6 channel sound over a 90 degree spread has each channel located 15 degrees apart from each other in the speaker array.

Mono sounds are spread as if they were a stereo signal, i.e. the signal is split into 2. The power will remain the same as it spreads around the speakers.

To summarize (for a stereo sound).

  1. A spread angle of 0 makes the stereo sound mono at the point of the 3D emitter.
  2. A spread angle of 90 makes the left part of the stereo sound place itself at 45 degrees to the left and the right part 45 degrees to the right.
  3. A spread angle of 180 makes the left part of the stero sound place itself at 90 degrees to the left and the right part 90 degrees to the right.
  4. A spread angle of 360 makes the stereo sound mono at the opposite speaker location to where the 3D emitter should be located (by moving the left part 180 degrees left and the right part 180 degrees right). So in this case, behind you when the sound should be in front of you!

See Also




Version 1.10.03 Built on Feb 1, 2018