something wrong with my .wav?


05-02-2010 07:07:48

Hi sticky,

I converted a mp3 file to a wav file, and there is an error when trying to play it. However when I convert mp3 to ogg, the ogg plays fine.

wav file

Here is my code:

OgreOggSound::OgreOggISound* sound = mOgreOggSoundManager->createSound(name,fileName);

if(sound != NULL)
return name;

Can you try playing the wav and see if you get any problems?

Also, I noticed that using the code above I get ambient noises, which is what I want. Now I'm starting to need some 3d sounds, but I can't figure out how to create 3d sounds. Do the sounds need to be attached to a scene node to be in the scene? I'm trying to implement things like footsteps or noises made by units attacking other units. It would be sweet to have a 'temporary 3d sound'. As is I'm guessing I'd need to create the sound, mark temporary, create a scene node, and attach it to a scene node. Any suggestions? :mrgreen:


06-02-2010 21:52:10

Hi kungfoomasta,

I'll look into to the sound file soon, as for 3d sounds, the only requirement is a mono sound file, that will have 3D attenuation applied automatically, it will therefore default to (0,0,0) until you position it either by attaching it to a scenenode, in which case it will automatically update itself, or by manually setting the position/direction using the OgreOggISound::setPosition()/OgreOggISound::setDirection() functions. If you don't attach the listener to a scenenode or manually update its position then all sounds would play without attenuation..

What exactly do you mean 'temporary 3D sounds', making 3D positioning temporary for a particular sound or making the 3D sound temporary? If its the former then theres a function for enabling/disabling 3D positioning for any sound at any time, if its the latter then its just using the markTemporary() function.

Is that helpful?

[Edit] Checked the sound file and its 32-bit which isn't supported, must be 16/8-bit you should have got a log message??[/Edit]


09-02-2010 16:40:33

Thanks Sticky, I should have checked the log. :oops: I will check it, I expect to get the same log message as you.

All my sounds so far have been 'ambient' type sounds, I wonder if they're all in stereo. I'll play around with some mono sounds and check my listener. As for temporary 3d sounds, I think the 'markTemporary' function fits my needs.