The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
December 14, 2024, 08:19:04 pm
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)
| | |-+  slow-reacting music and sound effects
« previous next »
Pages: [1] Print
Author Topic: slow-reacting music and sound effects  (Read 2186 times)
meonkeys
Zebranky food
*
Offline Offline

Posts: 3



View Profile
slow-reacting music and sound effects
« on: August 17, 2005, 01:57:28 am »

For some reason, it seems like the sound effects and music have a delay before they actually kick in. It's mostly noticable that the sound effects happen a moment or two after it seems like they should.

For instance, at the main game menu (New Game, Load Game Super Melee!, Setup, Quit), if I press the down arrow to select an option, the sound effect (alerting me to the fact that a different menu option was chosen) happens about half a second after the next option is highlighted.

Any suggestions on how to sync up the graphics and audio?
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: slow-reacting music and sound effects
« Reply #1 on: August 17, 2005, 02:41:30 am »

What operating system?
Logged

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

Posts: 3



View Profile
Re: slow-reacting music and sound effects
« Reply #2 on: August 17, 2005, 03:40:13 am »

Fedora Core 4.
Logged
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: slow-reacting music and sound effects
« Reply #3 on: August 17, 2005, 11:16:32 am »

I can duplicate your problems on SuSE 9.3 (on two different machines, one with an SB Audigy, the other with Intel AC97) by setting the SDL sound output to aRts instead of the default ALSA. Decreasing the aRts sound buffer size (e.g. through the KDE control panel) helps a bit, but the best solution is to switch to using ALSA directly instead of through aRts.

SDL checks the environment variable SDL_AUDIODRIVER for the sound driver to use. You can set this to "alsa" to use ALSA directly for sound. If aRts is running and your ALSA sound driver only supports one sound output stream at a time (which is typical for cheaper sound cards and integrated sound chips on older distributions; SuSE 9.3 seems to set up ALSA's built-in mixing; even lots of programs playing through ALSA to an AC97 card with one output works for me), the ALSA sound system will refuse the connection from SDL. In this case, suspend aRts ("artsshell suspend").

You can check what sound system SDL is using in UQM by reading the standard error output from UQM. You should see something like the following:

Code:
Initializing SDL audio subsystem.
SDL audio subsystem initialized.
Opening SDL audio device.
    using alsa at 44100 Hz 16 bit stereo, 4096 samples audio buffer
Initializing mixer.
If it says "using arts" instead of "using alsa", the problem is as described above. "using dsp" may also appear, this should also work properly.
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: slow-reacting music and sound effects
« Reply #4 on: August 17, 2005, 03:49:37 pm »

I've seen this on Arts too. I never liked Arts. Fortunately it is on its way out (it has been abandoned by its author, and KDE4 won't be using it anymore).
Novus' solution is a good one. If you don't have alsa, you can also choose to set SDL_AUDIODRIVER to dsp.
Logged

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

Posts: 3



View Profile
Re: slow-reacting music and sound effects
« Reply #5 on: August 18, 2005, 01:26:52 am »

That worked like a charm. Thanks, folks!

Setting SDL_AUDIODRIVER to esd, alsa, or dsp all worked equally well.
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!