VOGONS

Common searches


First post, by Guest

User metadata

Hello,

I used a lot of time to figure out why I wasn't getting any sound when using General MIDI in DOSBox - I could play MIDI files on my Linux box using Timidity via ALSA just fine.

Fiddling around a long time I noticed DOSBox is using the same ALSA PCM device for sound card emulation as Timidity. This might not be obvious when starting DOSBox, as it states it can find both an ALSA PCM device and timidity, which is correct. But of course Timidity cannot work because the device is taken up by DOSBox. It took a long time for me to realize what is going on, so I decided to tell it here in case somebody runs into the same problem 😉

The solution for now is to run DOSBox in nosound mode to get MIDI emulation - simple but difficult if you don't come to think of it 😉

On the other hand, if you have two or more PCM devices, one should be able to change the device used either by Timidity or DOSBox's sound card emulation to get both emulations at the same time - but this seems impossible at the moment. That makes it impossible to get General MIDI and e.g. Sound Blaster at the same time.

I think DOSBox should:

1) Have a config option to change the ALSA/OSS device used for emulation (if it has it could somebody tell me where, I couldn't find it)

and / or

2) check if the device it uses for emulation is the same as the one used by Timidity.

If somebody knows how to change the device Timidity uses (or DOSBox), then please tell me, so I can get SB and GM at the same time - that would be almost like an emulated AWE32!

- Ville

Reply 2 of 5, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

There ought to be a way to allow both programs to output at the same time and have their sound be automatically mixed together. I'm a Windows user though so I wouldn't have a clue whether that's possible or not (just that it's worked that way automatically in Windows for years now).

Thanks for posting the info though - I'm sure people will find it helpful.

Reply 5 of 5, by Guest

User metadata

Thanks prompt!

The AUDIODEV environment works nicely! (AUDIODEV=hw:0,1).

As for HunterZ comments, it is generally bad idea to use a mixer to mix several applications in one device in Linux, because most of the options for doing that are not that developed (=slower than using hardware directly, buggy and/or difficult to set up) as Windows's DirectX for example. And it would be pointless if you have two (or more) wave devices anyways.

-Ville