You are not logged in.

#1 2007-01-09 09:18:36

EnjoMitch
Member
From: Poland, Bytom
Registered: 2006-10-03
Posts: 17

Sound lag in dosbox & Can't subscribe to MIDI [SOLVED]

Hi

While using dosbox / scummvm the SFX sound is a bit delayed (not sure about the music) . Here's the debugging output from dosbox:

[enjo@myhost ~]$ dosbox
CONFIG: Using default settings. Create a configfile to change them
ALSA:Can't subscribe to MIDI port (65:0)
MIDI:Opened device:oss

I have alsa and timidity++ daemons activated, can play wavs using "aplay" and midis using "timidity". I also can't hear music in Crimson Fields (which is a .mid I believe) and I don't hear any sound using XMMS' Alsa plugin

Card: NVidia nForce2
Chip: C-Media Electronics CMI9739

alsaconf - configured OK
added to audio group OK
IEC958  enabled in alsamixer,  OK
"external"  unmuted
IE958 Capture Monitor muted
note that I had to disable the Sound System in KDE because of some errors - My CPU gets hung if it's on.

# /etc/modprobe.conf (for v2.6 kernels)
# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.13 ---
alias snd-card-0 snd-intel8x0
alias sound-slot-0 snd-intel8x0
# --- END: Generated by ALSACONF, do not edit. ---

Can anybody help ?

Offline

#2 2007-01-09 22:24:38

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Sound lag in dosbox & Can't subscribe to MIDI [SOLVED]

I'm just guessing but maybe the module it needs isn't modprobbed. What sound modules are loaded?

Offline

#3 2007-01-10 16:02:37

EnjoMitch
Member
From: Poland, Bytom
Registered: 2006-10-03
Posts: 17

Re: Sound lag in dosbox & Can't subscribe to MIDI [SOLVED]

Thanks for responding, here's the list:

[enjo@myhost muza]$ lsmod |grep snd
snd_rtctimer            2976  1
snd_seq_oss            29440  0
snd_seq_midi_event      6528  1 snd_seq_oss
snd_seq                47056  5 snd_seq_oss,snd_seq_midi_event
snd_pcm_oss            38944  0
snd_mixer_oss          14464  1 snd_pcm_oss
snd_mpu401              6376  0
snd_mpu401_uart         7040  1 snd_mpu401
snd_rawmidi            19360  1 snd_mpu401_uart
snd_seq_device          6796  3 snd_seq_oss,snd_seq,snd_rawmidi
snd_intel8x0           28828  1
snd_ac97_codec         91940  1 snd_intel8x0
snd_ac97_bus            2432  1 snd_ac97_codec
snd_pcm                68612  3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec
snd_timer              18948  3 snd_rtctimer,snd_seq,snd_pcm
snd                    44004  15 snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_mpu401,snd_mpu401_uart,snd_rawmidi,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
soundcore               6624  1 snd
snd_page_alloc          7816  2 snd_intel8x0,snd_pcm
rtc                    10292  1 snd_rtctimer

Anything else you'd need to know ?

Offline

#4 2007-01-10 20:13:11

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: Sound lag in dosbox & Can't subscribe to MIDI [SOLVED]

There's a chance dosbox is trying to access midi on the wrong port.

with my onboard-sound ac97/alsa/timidity i use this in the midi section of dosbox.conf :

[midi]
config=128:0
device=alsa
intelligent=true
mpu401=true

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2007-01-10 20:39:24

EnjoMitch
Member
From: Poland, Bytom
Registered: 2006-10-03
Posts: 17

Re: Sound lag in dosbox & Can't subscribe to MIDI [SOLVED]

[enjo@myhost gry]$ dosbox
CONFIG:Loading settings from config file dosbox.conf
ALSA:Client initialised [128:0]
MIDI:Opened device:alsa

Thanks ! Alsa initialised now but the SFX sound is still delayed

Offline

#6 2007-01-11 18:52:14

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: Sound lag in dosbox & Can't subscribe to MIDI [SOLVED]

Try increasing the soundbuffer dosbox uses, that helped me.

add   prebuffer=1000 to the [mixer] section .

Increase the number if it improves, but still isn't good enough.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2007-01-11 22:54:12

EnjoMitch
Member
From: Poland, Bytom
Registered: 2006-10-03
Posts: 17

Re: Sound lag in dosbox & Can't subscribe to MIDI [SOLVED]

aah great. What you suggested didn't help but made me look more into the config file and what helped was decreasing "blocksize" to 128 (it's the lowest acceptable value). Dunno what to do with scummvm but such lag is acceptable for adventure games

Thanks!

Offline

#8 2009-07-20 21:07:28

brihall
Member
Registered: 2008-01-21
Posts: 16

Re: Sound lag in dosbox & Can't subscribe to MIDI [SOLVED]

Also, for anyone tearing their hair out trying to get this to work with dosbox 0.73, "config" is now called "midiconfig". To get dosbox to use the MIDI daughtercard on my Aureal-based soundcard, I used this in ~/.dosbox :

[midi]
mpu401=intelligent
device=alsa
midiconfig=16:0

since my midi port is on 16, vice 17 for emu10k1.

> aconnect -i
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 16: 'Aureal Vortex au8830' [type=kernel]
    0 'au8830 MIDI 0   '

Offline

#9 2019-05-12 08:18:33

MewX
Member
Registered: 2019-05-12
Posts: 1

Re: Sound lag in dosbox & Can't subscribe to MIDI [SOLVED]

brihall wrote:

Also, for anyone tearing their hair out trying to get this to work with dosbox 0.73, "config" is now called "midiconfig". To get dosbox to use the MIDI daughtercard on my Aureal-based soundcard, I used this in ~/.dosbox :

[midi]
mpu401=intelligent
device=alsa
midiconfig=16:0

since my midi port is on 16, vice 17 for emu10k1.

> aconnect -i
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 16: 'Aureal Vortex au8830' [type=kernel]
    0 'au8830 MIDI 0   '


Nice one, you might also want to note that the section `device` has been changed to `mididevice`. i.e. in my case

[midi]
mpu401=intelligent
mididevice=alsa
midiconfig=14:0

reference: https://www.dosbox.com/wiki/Configuration:MIDI

Last edited by MewX (2019-05-12 08:20:31)

Offline

#10 2019-05-12 15:06:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,723

Re: Sound lag in dosbox & Can't subscribe to MIDI [SOLVED]

You might also note that you are responding to a 10 year old thread, chances that things have changed are very high. Please don't necrobump.

Closing.

Offline

Board footer

Powered by FluxBB