The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 16, 2024, 06:56:50 am
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  abnormally poor sound quality
« previous next »
Pages: [1] Print
Author Topic: abnormally poor sound quality  (Read 2571 times)
lmmars
Zebranky food
*
Offline Offline

Posts: 3



View Profile
abnormally poor sound quality
« on: August 17, 2005, 09:22:00 am »

UQM 0.4 with 3do music and voice sounded great on my system while it operated with Fedora 3.  I freshly installed Fedora 4 and now everything sounds fine except UQM.  UQM sounds crackly and muffled.  The music files (extracted from the .uqm packages) sound as great as before on other applications.  How does UQM play sound?  Understanding the mechanism would give me some clues to fix this.  Can someone suggest how to fix this?  Thanks!
Logged
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: abnormally poor sound quality
« Reply #1 on: August 17, 2005, 11:20:02 am »

UQM uses SDL to play sound. SDL in turn can output through aRts, ALSA and OSS at least; it attempts to auto-detect the most suitable sound output. UQM prints to standard error information on which sound output it is running.

Code:
SDL audio subsystem initialized.
Opening SDL audio device.
    using alsa at 44100 Hz 16 bit stereo, 4096 samples audio buffer

You can override this by setting the environment variable SDL_AUDIODRIVER to e.g. "alsa", "arts" or "dsp".
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: abnormally poor sound quality
« Reply #2 on: August 17, 2005, 03:57:54 pm »

I don't know how the Fedora 4 package is compiled, but chances are, it's using OpenAL for sound mixing. OpenAL is supposed to be a cross-platform audio library, but it's terrible on Linux, causing problems as the one described by you for many people. That's why it is off by default. If the Fedora 4 UQM package uses OpenAL, the package maintainer must have added '--sound=openal' to the UQM startup script.
If you really want to use OpenAL (positional audio is not supported for MixSDL), you can also try to choose a different backend for it. It may work, it may not work.Try putting one of the following lines in ~/.openalrc:
(define devices '(dsp))
(define devices '(alsa))
(define devices '(sdl))
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
lmmars
Zebranky food
*
Offline Offline

Posts: 3



View Profile
Re: abnormally poor sound quality
« Reply #3 on: August 18, 2005, 01:46:58 am »

Dear meep-eep,

I thought it may have been openAL too, but openAL doesn't seem to be on my system.  Thanks for your suggestions.

Dear Novus,

Setting the SDL_AUDIODRIVER variable solved the issue.  I think SDL was forwarding the audio to ESounD (but I'm not sure -- is there some way to check?).  Setting the variable to ALSA made everything sound normal again, but disables the audio-stream mixing ESounD provides.  I'm going to check whether my ESounD is setup correctly.

Thanks for your help, folks!

Question:  Do you know a permanent way to change the SDL audio driver?
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: abnormally poor sound quality
« Reply #4 on: August 18, 2005, 02:07:37 am »

Changing the audio driver permanently for UQM only can be done easilly by editing the uqm script that starts the actual executable, and setting SDL_AUDIODRIVER there.
If you want to change it for every SDL program, for every user (without requiring env vars set), you could recompile SDL without ESD support.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: abnormally poor sound quality
« Reply #5 on: August 18, 2005, 09:15:14 am »

As I said, UQM will report the sound device SDL is using on stderr. Look for the line that says something like:

Code:
    using alsa at 44100 Hz 16 bit stereo, 4096 samples audio buffer

Here, "alsa" is the sound system being used (ALSA).

You can automatically set environment variables on login by adding them to a script that is run at login. Try looking at ~/.profile and ~/.bashrc. Adding "EXPORT SDL_AUDIODRIVER=alsa" to ~/.profile should do the trick. See also this article on shell initialisation.
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
lmmars
Zebranky food
*
Offline Offline

Posts: 3



View Profile
Re: abnormally poor sound quality
« Reply #6 on: August 18, 2005, 10:05:51 am »

SDL was definitely using ESounD when the audio sounded garbled.

meep-eep and Novus:  Your suggestions work.  Thanks!

Novus:  Sorry to not read your first message more carefully.  I have a bad tendancy of not noticing some key words while looking directly at them.  It's strange.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!