VOGONS


MT-32 neverending buffer underrun

Topic actions

First post, by Varka

User metadata
Rank Newbie
Rank
Newbie

This hasn't been the most obvious utility to build, so I may have done something wrong.

I'm running Mandriva 2010 x86_64 on a Dell e6500 Latitude laptop

I couldn't find a source package for mt32emu_alsadrv, so I checked out CVS on mt32emu and mt32emu_alsadrv.

I compiled mt32emu with ./autogen.sh, ./configure, make, and make install.

I compiled mt32emu_alsadrv with "make."

This left me with mt32d and xmt32 executables.

When I run either of those executables I inevitably end up with horrible sound skipping and hundreds and hundreds of "Output buffer overrun" errors. Sometimes is happens immediately, sometimes it waits a few minutes. It also happens when I simply run mt32d in a console and let the computer sit idle.

Any idea what I'm doing wrong?

Reply 1 of 24, by collector

User metadata
Rank l33t
Rank
l33t

This is based on using a real MT-32, so it may not apply to Munt, but DOSBox may be sending its SYSEX information too fast. Try slowing down DOSBox, at least while it is loading your game.

Reply 3 of 24, by collector

User metadata
Rank l33t
Rank
l33t

You can speed up DOSBox after it has loaded. This is not unlike the old Sierra work around to the "Unable to initialize your audio hardware" timer error with the old Sierra SoundBlaster driver on faster machines. Slow down the PC by turning off the Turbo switch to start the game, but after the game initializes the driver, turn it back on.

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 7 of 24, by Varka

User metadata
Rank Newbie
Rank
Newbie
[brikeener@localhost mt32emu_alsadrv]$ ./mt32d
MT-32 emulator ALSA address is 128:0
Buffer resize: Requested 40 msec got 40 msec / 14 periods
Starting MT-32 core
Loading Control ROM
Loading PCM ROM
Initialising Timbre Bank A
Initialising Timbre Bank B
Initialising Timbre Bank R
Initialising Timbre Bank M
Initialising PCM List
Initialising Rhythm Temp
Initialising Patches
Initialising System
Master Tune: 441.990082
Reverb: mode=0, time=5, level=3
Partial reserve: 1=03 2=10 3=06 4=04 5=03 6=00 7=00 8=00 Rhythm=06
Part assign: 1=01 2=02 3=03 4=04 5=05 6=06 7=07 8=08 Rhythm=09
Master volume: 100
Initialising Constant Tables
*** Initialisation complete ***
MT-32 emulator ready
DOSBOX subscribed to MT-32 port
RESET
Master Tune: 441.990082
Reverb: mode=0, time=5, level=3
Partial reserve: 1=03 2=10 3=06 4=04 5=03 6=00 7=00 8=00 Rhythm=06
Part assign: 1=01 2=02 3=03 4=04 5=05 6=06 7=07 8=08 Rhythm=09
Master volume: 100
WRITE-SYSTEM:
Master Tune: 441.990082
Reverb: mode=0, time=5, level=3
Partial reserve: 1=03 2=10 3=06 4=04 5=03 6=00 7=00 8=00 Rhythm=06
Part assign: 1=01 2=02 3=03 4=04 5=05 6=06 7=07 8=08 Rhythm=09
Master volume: 100
WRITE-SYSTEM:
Master Tune: 441.990082
Reverb: mode=0, time=5, level=3
Partial reserve: 1=03 2=04 3=03 4=04 5=03 6=04 7=03 8=04 Rhythm=04
Part assign: 1=01 2=02 3=03 4=04 5=05 6=06 7=07 8=08 Rhythm=09
Master volume: 100
WRITE-SYSTEM:
Master Tune: 441.990082
Reverb: mode=0, time=3, level=2
Partial reserve: 1=03 2=04 3=03 4=04 5=03 6=04 7=03 8=04 Rhythm=04
Part assign: 1=01 2=02 3=03 4=04 5=05 6=06 7=07 8=08 Rhythm=09
Master volume: 100
Rhythm: Pointlessly setting pan (64) on rhythm part
WRITE-TIMBRE (128-128@0..14): 128; name="Step "
WRITE-TIMBRE (128-128@14..72): 128; name="Step "
WRITE-TIMBRE (128-128@72..130): 128; name="Step "
WRITE-TIMBRE (128-128@130..188): 128; name="Step "
WRITE-TIMBRE (128-128@188..246): 128; name="Step "
WRITE-PATCH (0-0@0..2): 0; timbre=128 (Step ) 020018320C000100
WRITE-TIMBRE (129-129@0..14): 129; name="Step2 "
WRITE-TIMBRE (129-129@14..72): 129; name="Step2 "
WRITE-TIMBRE (129-129@72..130): 129; name="Step2 "
WRITE-TIMBRE (129-129@130..188): 129; name="Step2 "
WRITE-TIMBRE (129-129@188..246): 129; name="Step2 "
WRITE-PATCH (1-1@0..2): 1; timbre=129 (Step2 ) 020118320C000100
Show last 182 lines
WRITE-TIMBRE (130-130@0..14): 130; name="Boom (Low)"
WRITE-TIMBRE (130-130@14..72): 130; name="Boom (Low)"
WRITE-TIMBRE (130-130@72..130): 130; name="Boom (Low)"
WRITE-TIMBRE (130-130@130..188): 130; name="Boom (Low)"
WRITE-TIMBRE (130-130@188..246): 130; name="Boom (Low)"
WRITE-PATCH (2-2@0..2): 2; timbre=130 (Boom (Low)) 020218320C000100
WRITE-TIMBRE (131-131@0..14): 131; name="Klang "
WRITE-TIMBRE (131-131@14..72): 131; name="Klang "
WRITE-TIMBRE (131-131@72..130): 131; name="Klang "
WRITE-TIMBRE (131-131@130..188): 131; name="Klang "
WRITE-TIMBRE (131-131@188..246): 131; name="Klang "
WRITE-PATCH (3-3@0..2): 3; timbre=131 (Klang ) 020318320C000100
WRITE-TIMBRE (132-132@0..14): 132; name="Clink "
WRITE-TIMBRE (132-132@14..72): 132; name="Clink "
WRITE-TIMBRE (132-132@72..130): 132; name="Clink "
WRITE-TIMBRE (132-132@130..188): 132; name="Clink "
WRITE-TIMBRE (132-132@188..246): 132; name="Clink "
WRITE-PATCH (4-4@0..2): 4; timbre=132 (Clink ) 020418320C000100
WRITE-TIMBRE (133-133@0..14): 133; name="Thud "
WRITE-TIMBRE (133-133@14..72): 133; name="Thud "
WRITE-TIMBRE (133-133@72..130): 133; name="Thud "
WRITE-TIMBRE (133-133@130..188): 133; name="Thud "
WRITE-TIMBRE (133-133@188..246): 133; name="Thud "
WRITE-PATCH (5-5@0..2): 5; timbre=133 (Thud ) 020518320C000100
WRITE-TIMBRE (134-134@0..14): 134; name="Hit "
WRITE-TIMBRE (134-134@14..72): 134; name="Hit "
WRITE-TIMBRE (134-134@72..130): 134; name="Hit "
WRITE-TIMBRE (134-134@130..188): 134; name="Hit "
WRITE-TIMBRE (134-134@188..246): 134; name="Hit "
WRITE-PATCH (6-6@0..2): 6; timbre=134 (Hit ) 020618320C000100
WRITE-TIMBRE (135-135@0..14): 135; name="Fire (low)"
write[4]: Wanted 0x02 at 34578, but max 0x01
WRITE-TIMBRE (135-135@14..72): 135; name="Fire (low)"
WRITE-TIMBRE (135-135@72..130): 135; name="Fire (low)"
WRITE-TIMBRE (135-135@130..188): 135; name="Fire (low)"
WRITE-TIMBRE (135-135@188..246): 135; name="Fire (low)"
WRITE-PATCH (7-7@0..2): 7; timbre=135 (Fire (low)) 020718320C000100
WRITE-TIMBRE (136-136@0..14): 136; name="Water "
write[4]: Wanted 0x02 at 34834, but max 0x01
WRITE-TIMBRE (136-136@14..72): 136; name="Water "
write[4]: Wanted 0x02 at 34892, but max 0x01
WRITE-TIMBRE (136-136@72..130): 136; name="Water "
WRITE-TIMBRE (136-136@130..188): 136; name="Water "
WRITE-TIMBRE (136-136@188..246): 136; name="Water "
WRITE-PATCH (8-8@0..2): 8; timbre=136 (Water ) 020818320C000100
WRITE-TIMBRE (137-137@0..14): 137; name="Door "
write[4]: Wanted 0x02 at 35090, but max 0x01
WRITE-TIMBRE (137-137@14..72): 137; name="Door "
WRITE-TIMBRE (137-137@72..130): 137; name="Door "
WRITE-TIMBRE (137-137@130..188): 137; name="Door "
WRITE-TIMBRE (137-137@188..246): 137; name="Door "
WRITE-PATCH (9-9@0..2): 9; timbre=137 (Door ) 020918320C000100
WRITE-TIMBRE (138-138@0..14): 138; name="Cry "
write[4]: Wanted 0x02 at 35346, but max 0x01
WRITE-TIMBRE (138-138@14..72): 138; name="Cry "
write[4]: Wanted 0x02 at 35404, but max 0x01
WRITE-TIMBRE (138-138@72..130): 138; name="Cry "
WRITE-TIMBRE (138-138@130..188): 138; name="Cry "
WRITE-TIMBRE (138-138@188..246): 138; name="Cry "
WRITE-PATCH (10-10@0..2): 10; timbre=138 (Cry ) 020A18320C000100
WRITE-TIMBRE (139-139@0..14): 139; name="Growl "
write[4]: Wanted 0x02 at 35602, but max 0x01
WRITE-TIMBRE (139-139@14..72): 139; name="Growl "
WRITE-TIMBRE (139-139@72..130): 139; name="Growl "
WRITE-TIMBRE (139-139@130..188): 139; name="Growl "
WRITE-TIMBRE (139-139@188..246): 139; name="Growl "
WRITE-PATCH (11-11@0..2): 11; timbre=139 (Growl ) 020B18320C000100
WRITE-TIMBRE (140-140@0..14): 140; name="Splash "
write[4]: Wanted 0x02 at 35858, but max 0x01
WRITE-TIMBRE (140-140@14..72): 140; name="Splash "
write[4]: Wanted 0x02 at 35916, but max 0x01
WRITE-TIMBRE (140-140@72..130): 140; name="Splash "
WRITE-TIMBRE (140-140@130..188): 140; name="Splash "
WRITE-TIMBRE (140-140@188..246): 140; name="Splash "
WRITE-PATCH (12-12@0..2): 12; timbre=140 (Splash ) 020C18320C000100
WRITE-TIMBRE (141-141@0..14): 141; name="Whoosh "
WRITE-TIMBRE (141-141@14..72): 141; name="Whoosh "
WRITE-TIMBRE (141-141@72..130): 141; name="Whoosh "
WRITE-TIMBRE (141-141@130..188): 141; name="Whoosh "
WRITE-TIMBRE (141-141@188..246): 141; name="Whoosh "
WRITE-PATCH (13-13@0..2): 13; timbre=141 (Whoosh ) 020D18320C000100
WRITE-TIMBRE (142-142@0..14): 142; name="Whoosh2 "
WRITE-TIMBRE (142-142@14..72): 142; name="Whoosh2 "
WRITE-TIMBRE (142-142@72..130): 142; name="Whoosh2 "
WRITE-TIMBRE (142-142@130..188): 142; name="Whoosh2 "
WRITE-TIMBRE (142-142@188..246): 142; name="Whoosh2 "
WRITE-PATCH (14-14@0..2): 14; timbre=142 (Whoosh2 ) 020E18320C000100
WRITE-TIMBRE (143-143@0..14): 143; name="Doorslam "
WRITE-TIMBRE (143-143@14..72): 143; name="Doorslam "
WRITE-TIMBRE (143-143@72..130): 143; name="Doorslam "
WRITE-TIMBRE (143-143@130..188): 143; name="Doorslam "
WRITE-TIMBRE (143-143@188..246): 143; name="Doorslam "
WRITE-PATCH (15-15@0..2): 15; timbre=143 (Doorslam ) 020F18320C000100
WRITE-TIMBRE (144-144@0..14): 144; name="Skitter "
WRITE-TIMBRE (144-144@14..72): 144; name="Skitter "
WRITE-TIMBRE (144-144@72..130): 144; name="Skitter "
WRITE-TIMBRE (144-144@130..188): 144; name="Skitter "
WRITE-TIMBRE (144-144@188..246): 144; name="Skitter "
WRITE-PATCH (16-16@0..2): 16; timbre=144 (Skitter ) 021018320C000100
WRITE-TIMBRE (145-145@0..14): 145; name="Flutter "
WRITE-TIMBRE (145-145@14..72): 145; name="Flutter "
WRITE-TIMBRE (145-145@72..130): 145; name="Flutter "
WRITE-TIMBRE (145-145@130..188): 145; name="Flutter "
WRITE-TIMBRE (145-145@188..246): 145; name="Flutter "
WRITE-PATCH (17-17@0..2): 17; timbre=145 (Flutter ) 021118320C000100
WRITE-TIMBRE (146-146@0..14): 146; name="Slither "
WRITE-TIMBRE (146-146@14..72): 146; name="Slither "
write[4]: Wanted 0x02 at 37452, but max 0x01
WRITE-TIMBRE (146-146@72..130): 146; name="Slither "
WRITE-TIMBRE (146-146@130..188): 146; name="Slither "
WRITE-TIMBRE (146-146@188..246): 146; name="Slither "
WRITE-PATCH (18-18@0..2): 18; timbre=146 (Slither ) 021218320C000100
WRITE-TIMBRE (147-147@0..14): 147; name="Thump "
WRITE-TIMBRE (147-147@14..72): 147; name="Thump "
WRITE-TIMBRE (147-147@72..130): 147; name="Thump "
WRITE-TIMBRE (147-147@130..188): 147; name="Thump "
WRITE-TIMBRE (147-147@188..246): 147; name="Thump "
WRITE-PATCH (19-19@0..2): 19; timbre=147 (Thump ) 021318320C000100
WRITE-TIMBRE (148-148@0..14): 148; name="Port "
write[4]: Wanted 0x02 at 37906, but max 0x01
WRITE-TIMBRE (148-148@14..72): 148; name="Port "
WRITE-TIMBRE (148-148@72..130): 148; name="Port "
WRITE-TIMBRE (148-148@130..188): 148; name="Port "
WRITE-TIMBRE (148-148@188..246): 148; name="Port "
WRITE-PATCH (20-20@0..2): 20; timbre=148 (Port ) 021418320C000100
WRITE-TIMBRE (149-149@0..14): 149; name="Click "
WRITE-TIMBRE (149-149@14..72): 149; name="Click "
WRITE-TIMBRE (149-149@72..130): 149; name="Click "
WRITE-TIMBRE (149-149@130..188): 149; name="Click "
WRITE-TIMBRE (149-149@188..246): 149; name="Click "
WRITE-PATCH (21-21@0..2): 21; timbre=149 (Click ) 021518320C000100
WRITE-TIMBRE (150-150@0..14): 150; name="Rumble "
write[4]: Wanted 0x02 at 38418, but max 0x01
WRITE-TIMBRE (150-150@14..72): 150; name="Rumble "
WRITE-TIMBRE (150-150@72..130): 150; name="Rumble "
WRITE-TIMBRE (150-150@130..188): 150; name="Rumble "
WRITE-TIMBRE (150-150@188..246): 150; name="Rumble "
WRITE-PATCH (22-22@0..2): 22; timbre=150 (Rumble ) 021618320C000100
WRITE-TIMBRE (151-151@0..14): 151; name="Thwang "
WRITE-TIMBRE (151-151@14..72): 151; name="Thwang "
WRITE-TIMBRE (151-151@72..130): 151; name="Thwang "
WRITE-TIMBRE (151-151@130..188): 151; name="Thwang "
WRITE-TIMBRE (151-151@188..246): 151; name="Thwang "
WRITE-PATCH (23-23@0..2): 23; timbre=151 (Thwang ) 021718320C000100
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun
Output buffer underrun

Reply 11 of 24, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Yeah, if you're wanting to use MT-32 emulation with DOSBox specifically, you can build munt/mt32emu support directly into DOSBox instead of building it as a system-level driver.

SCUMMVM supports this as well.

Edit: If the instruments sounded wrong then you probably didn't have it configured properly to use the internal MT32 driver instead of MPU-401.

Reply 12 of 24, by Varka

User metadata
Rank Newbie
Rank
Newbie

Well, I was just toying around with Gulikoza's build in Linux and it's doing the same thing as the standalone Linux mt32d.

Very choppy. I don't see any "buffer underruns" in the console but it sounds like they're still happening.

I'll see how it runs under 32-bit.

I REALLY want my MT32 music with Darklands...

Reply 13 of 24, by Varka

User metadata
Rank Newbie
Rank
Newbie

OK, this might actually be useful.

On my dual-core 2.8ghz laptop, mt32d is consuming between 80 - 100% cpu usage.

When CPU usage reaches 100% CPU usage I get the buffer underrun errors.

I used the mt32 emulator a long time ago, and I remember that it used to pregenerate waveforms or somesuch. Has that changed? What can I do to reduce cpu usage?

Reply 14 of 24, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

You used to be able to run it at a lower sampling rate to reduce CPU usage. Not sure if that's still the case though.

Might also try to minimize the cycle count at which you run DOSBox to keep as much CPU free as possible for MT-32 emulation.

Reply 15 of 24, by Varka

User metadata
Rank Newbie
Rank
Newbie

Well it's a dual-core laptop. mt32d consumes 100% of core 1, and dosbox is merrily chugging along at about 25% CPU usage on core 2.

How do you set sampling rate for mt32d anyway? Dosbox.conf has no impact?

*edit*

Found the sample rate in source code. I'll re-compile and try again.

*/edit*

Last edited by Varka on 2010-03-23, 20:19. Edited 1 time in total.

Reply 16 of 24, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

No idea, might try poking around the mt32emu source...

I bought a real MT-32 a few years ago so that I wouldn't have to bother with emulation (although it would admittedly be nice on a laptop).

Reply 17 of 24, by Varka

User metadata
Rank Newbie
Rank
Newbie

Yeah, I'm asking my wife for one for my birthday.

She doesn't really understand though.

I may see if anyone would be interested in swapping out a Gravis Ultrasound for a MT-32. I just noticed GUS's are going for $150+ on ebay, and I've got several.

Reply 18 of 24, by Varka

User metadata
Rank Newbie
Rank
Newbie

i386 build has same problem.

MT32D initially consumes about 35% CPU usage, and over a period of ten to twenty seconds it steadily builds to 99% CPU usage and sound goes to hell and buffer underruns being showing in the console log.

Reply 19 of 24, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Kind of seems like maybe it's not timing out notes or something...

You might try getting the latest munt source from the munt project at sourceforge.net if you're currently getting it from somewhere else...