SFML community forums
Bindings - other languages => DotNet => Topic started by: AleVerDes on January 05, 2014, 07:24:49 pm
-
Hi!
How do I get surround sound and changing panorama?
I set Listener:
Listener
.Position = new Vector3f
(0
.0f, 0
.0f, 0
.0f
);Listener
.Direction = new Vector3f
(0
.0f, 0
.0f,
-1
.0f
);Listener
.GlobalVolume = 100
.0f
;
I set Sound: (soundbuffer have a 2 channel)
sound
= new Sound
(snd_shot_m249
);sound
.RelativeToListener = false;sound
.Position = new Vector3f
(0
.0f, 0
.0f, 0
.0f
);sound
.MinDistance = 5
.0f
;sound
.Attenuation = 10
.0f
;sound
.Play();
But when the position changes nothing sound - the sound still comes from the center of the panorama.
I think the problem may be in the audio file (http://rusfolder.com/39387152). Please help to solve this problem.
-
If I am not mistaken, audio must be mono in order for sound positioning to work.
-
Thank you, you helped me .
But one more question on the same topic - transcode to mono WAV- format mode failed, so I had to use OGG. What are the risks ?
Explain the problem with WAV - output file weighs as much as his stereo original, standard players played normally. But when loaded into the game using SFML problems - no sound is played . About him , all the information up to the number of channels and the size , but the sound can not be played . The same thing happens if the file encode WAV- format in stereo mode ( surprising, but this file , in ideas , in no way should be different from the original, but weighs twice as much and also can not be played means SFML).
-
If I am not mistaken, audio must be mono in order for sound positioning to work.
Exactly, and it's highlighted in red in the tutorial. Why do people never read tutorials? :(
I don't know about the second problem, maybe the files are corrupted? Do you use special settings when creating the sound files?