Skip to contentSkip to conversation

: Very high latency with MIDI soft + dmix + ALSA PCM

ALSA - lib 0000765 [email protected] 1 participant 1 message Dec 31, 2004

lore
Share & tools
lore
#0 lore raw

The following issue has been SUBMITTED.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=765>
======================================================================
Reported By: ccasteyde
Assigned To:
======================================================================

Project:                    ALSA - lib
Issue ID:                   765
Category:                   general
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             12-31-2004 13:54 CET
Last Modified:              12-31-2004 13:54 CET

======================================================================
Summary: Very high latency with MIDI soft + dmix + ALSA PCM
Description:
There is a high latency problem with the ALSA MIDI sequencer and the PCM interface, and this is even more true when dmix is used.

My goal was to use Timidity or fluidsynth as soft wavetable to emulate MIDI port 128:0 and mix their output with other PCM applications through dmix. It's nearly impossible, since in this configuration sound is hashed as if the synth software was unable to output data while dealing with each MIDI tune. I think nearly 30% sound is lost during this process.

The funny thing is that forcing Timidity to use aRts as output, and configuring aRts itself to use ALSA pcm dmixer makes everything works nicely. I think this is due to the extra desynchronisation and buffering due to the main aRts thread, which lets Timidity release ALSA resource before sending the output to the DMA card.

I therefore suspect a locking problem/resource contention in ALSA driver/ALSALib. If this proves true, and cannot be fixed with fine locking rules, I think it is in ALSA lib the problem should be fixed rather than in each sound software (the problem appears with both Timidity and Fluidsynth and certainly all software that use both input and ouput ALSA devices).
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
12-31-04 13:54 ccasteyde New Issue
12-31-04 13:54 ccasteyde File Added: asound.conf
======================================================================

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt