wav and ogg files, very bad sound.

Posted By: sadsack

wav and ogg files, very bad sound. - 10/28/08 23:39

Hello,
I have yet to use sound in 3DGS untill now. Yes, you are right, I am haveing some problems. When the sound file (both wav and ogg) are played they are so bad you can't make out what is being played. I may not be doing it right. Here is the code I am using.
CODE:
Code:
SOUND* landing_snd = "call_1.wav"; 
//Then in the while loop I have this

if(total_secs ==10){snd_play(landing_snd,50,0);}



Now is that the right way of doing or is there a better way?
Thank You
renny
Posted By: Uhrwerk

Re: wav and ogg files, very bad sound. - 10/29/08 02:26

Your code is totall ok. Although it makes no sense to use the if expression inside a while loop. total_secs == 10 is even dangerous, cause it is not guaranteed, that you'll get the exact moment when total_secs has the value of 10. Better use a simple approach like
Code:
wait(-10)
snd_play(landing_snd,100,0);


However if the sound is played that is not the matter. You should ensure that you have:
* a clean installation of your sound driver and directx.
* set the appopriate volume on your soundcard and on your speakers.
* a sound file with good quality. 22.000 hz at 16 bit should be ok for wav files.

Try playing the soundfile with windows media player (or any other preferred player like winamp etc.) Does the sound sound better? If so you have for sure a driver or directx problem. Don't bother about your code. It is ok. Is the sound better when you play it with media_play instead of snd_play? If so you can be sure to have a direct sound problem. You can try to click "start", "run" and type "dxdiag.exe". Hit enter. In the upcoming window change to the sound tab and move the slider for hardware acceleration to the left. Does that help?
Posted By: sadsack

Re: wav and ogg files, very bad sound. - 10/29/08 13:31

Thanks Uhrwerk,
yes I have tryed all of the above. still no luck. In the manual it talks about a filter for the sound sys.
renny
Posted By: Uhrwerk

Re: wav and ogg files, very bad sound. - 10/29/08 18:42

Is the problem occuring with all sound files you try or just with a certain one?
Posted By: sadsack

Re: wav and ogg files, very bad sound. - 10/29/08 18:52

I have a few test I want to make, I will get back to you.
renny
© 2023 lite-C Forums