|
bad sound quality when playing certain samples |
Gerwin Broers
Member #3,681
July 2003
|
Yesterday I noticed that one of the background sounds in my game (looped) sounds very poor. Though, When playing that wav file with another windows based media player program, it sounds better? Why is this quality drop, how can I improve the sound quality? ---------------------------------------------- Main Project: HeroQuest. And Other Stuff |
Kris Asick
Member #1,424
July 2001
|
Sounds fine on my system, both using Allegro and straight through Media Player. Is it just that sound effect that's giving you trouble, or are others doing it too? There could be a variety of reasons why it's not sounding correct in your code. --- Kris Asick (Gemini) --- Kris Asick (Gemini) |
Paul whoknows
Member #5,081
September 2004
|
Quote: Yesterday I noticed that one of the background sounds in my game (looped) sounds very poor. Though, When playing that wav file with another windows based media player program, it sounds better?
Same thing happened to me once, nobody could explain this, and still it doesn't work properly, not only the sound quality is affected, also during playback the sound is speed it up. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
Gerwin Broers
Member #3,681
July 2003
|
So one reply "nothing wrong here" and one "got that too"... It is a bit hard to determine sound quality, this one sample is obvious though, in the game it sounds like a defective speaker squeaking. Now I have just tried running it on my windows 2000 PC, with the same soundcard, guess what: it sounds better! Main Project: HeroQuest. And Other Stuff |
Kitty Cat
Member #2,815
October 2002
|
What version of Allegro? Do you change any of the mixer settings? What are the playback settings on the Win98 system (check get_mixer_bits, get_mixer_frequency, and get_mixer_channels; get_mixer_quality would be nice, too)? -- |
miran
Member #2,407
June 2002
|
Quote: it is 8 bit, mono, sample rate 22000 Do you still have that sample at the original full quality? If so, try exporting it to 8bit, mono, sample rate 22050. Perhaps on the Win98SE machine some mixer at some point in the process doesn't cope quite that well with resampling 22000 Hz to 22050 or 44100 and introduces a lot of aliasing. Or something... -- |
Kris Asick
Member #1,424
July 2001
|
My guess is something's up with the computer it's not sounding fine on. Such as too many applications running in the background, outdated drivers for your sound or video card, or something like that. You may also have the internal volume settings too high and it's thus distorting the sound effect. Try turning the Windows volume slider down and your own speakers up and see if that helps. If it does, it's a volume thing. If not, then it's a software or driver thing. --- Kris Asick (Gemini) --- Kris Asick (Gemini) |
Audric
Member #907
January 2001
|
I had some Win98 sound problems as well, some years ago: it sounds like a 16bit sample fed "as is" to a 8bit voice, or the other way round. Might be worth investigating the allegro.cfg as well : maybe a new allegro.cfg is mis-read by an old allegro executable, or the other way round. edit: By the way: I also have a SB Live. |
Kris Asick
Member #1,424
July 2001
|
Just for the record, I have an SB Live card too, am using Allegro 4.2.0, and work in Windows 98SE, and have never encountered the problems being described... Just in case someone wanted to blame that specific combination. I'm certain there's more to it. Other things you might want to try, Gerwin, is trying different video modes, both full-screen and windowed, testing the sound effect in the Grabber application, essentially, expose the sound through Allegro to as many different environments and configurations as you can on your one system. See if you can't narrow down what combination of things is making the sound effect go screwy in Allegro. You may also want to try going into your multimedia settings through the control panel and checking out the advanced properties for your sound settings. See if altering any of the acceleration sliders helps. --- Kris Asick (Gemini) --- Kris Asick (Gemini) |
Gerwin Broers
Member #3,681
July 2003
|
Ok, first of all, thanks you for the replies! I requested mixer's bits, frequency, channels, quality, voices. which gave 16,44100,2,2(=interpolated 16-bit mixing),8. Sound driver used is directsound. Using DIGI_WAVOUTID(0) the program locks up. I played the wav file from within the grabber on the same system, it sounds good! I played the wav file from this minimalistic program, it sounds bad: #include "allegro.h" Now I don't see anything fancy grabber.c, what is the difference between the grabber and the program above in playing the sample? Main Project: HeroQuest. And Other Stuff |
Richard Phipps
Member #1,632
November 2001
|
Kris Asick
Member #1,424
July 2001
|
The Grabber is initializing a graphics mode. You aren't. Try setting yourself into a graphics mode before playing the sound effect and see if that helps. --- Kris Asick (Gemini) --- Kris Asick (Gemini) |
Paul whoknows
Member #5,081
September 2004
|
Like I said, I have the same problem, (Windows XP, Audio Aureal Vortex 8830(WDM)). ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
Gerwin Broers
Member #3,681
July 2003
|
- The grabber played the sample fine, because it was still compiled for version 4.0.3 of allegro, using alleg40.dll. When trying a later grabber.exe, using alleg42.dll the playback sucks again, just like my game and test program (which also use alleg42.dll). So the problem, as I have it, was introduced with version 4.2.0. Which figures because otherwise I would have noticed the the problem earlier. - reserve voices makes no difference . - initializing graphics mode first makes no difference. - the sample rate of the file was indeed 22050 instead of 22000, that was a typo. Main Project: HeroQuest. And Other Stuff |
Kitty Cat
Member #2,815
October 2002
|
Can you print out the digi_driver->name and digi_driver->desc strings (of both the 4.0.3 and 4.2.0 programs)? Actually the play command in the test/ directory should do that. What do you mean by 'poor', anyway? Does it have static, is it quieted, is it muffled, does it have a 'whine', or..? -- |
Gerwin Broers
Member #3,681
July 2003
|
Well then, Attached the distorted wav, in my first post of this topic you can find the original one. digi_driver->name and digi_driver->desc strings next I discovered my sound hardware acceleration setting was in setting 2 of 4. which is necessary for running Jane's usaf flightsim properly. Setting acceleration to 4/4 makes the problem go away..... damn, so it is very specific, probably too specific to invest any time in, but I did not know that when starting this topic. Main Project: HeroQuest. And Other Stuff |
|