VOGONS

Common searches


First post, by Marcel de Reus

User metadata
Rank Newbie
Rank
Newbie

Hey guys,

I recently start using DosBox and I really like it. I had to run the CVS version because of an alsa compilation error, but the CVS compiled and runs fine.
But I kept a problem, no-midi device could be openend. After some research at this forum and google, I did the following things:
* compiled the snd-virmidi module and load it with the snd_index=1 parameter
* edited my modules.conf to set up the virtual midi card properly
* compiled fluidsynth
* searched for a soundfont and found (ffantasy.SF2) one.
* runned 'fluidsynth -m alsa_seq -a alsa /etc/midi/ffantasy.SF2'
* runned 'aconnect 72:0 128:0'
* edited the DosBox config file to 'device=alsa' and 'config=72:0'
Now DosBox says that he succesfully opened an ALSA midi-device so I think that part of the story works?

But my problem (stuttering sound) wasn't solved. The sound remains really poor. I changed the blocksize to 4096 but also that doesn't help. I tested it with various games as Monster Bash, Keen, Prince of Percia, etc.
My questions is offcourse, how can I fix te sound?

Thanks a lot in advance.

PS: Does someone here know how to get fluidsynth so far that its doesn't display his shell (the -i) optie and doens't quit immediately either? Because if I run it with the -i option port 128 won't be there.
PS2: Where can I get a better Soundfont? Wich are you guys using for example?

[edit]
BTW it's an laptop with an AXP 2200+, 512MB DDR, VIA KT333 board and an ATI Radeon Mobility 9000. Should be enough 😉

Time is the best teacher, unfortunatly it kills al it's students.

Reply 1 of 4, by Harekiet

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Probably an issue with SDL using some crappy audio server for audio output, check SDL docs for environment vars you can set to let SDL use more sensible audio output.

Reply 2 of 4, by taiken7

User metadata
Rank Member
Rank
Member

Sorry this is not exactly what you asked, but if you're game to try a little
Linux hacking:

---Quote 8< ---

7.4 OSS sound is crappy; can't I use Timidity for MIDI output?

Chris Spiegel has indeed found a way to do this. Here it is, copied verbatim from an e-mail he submitted to the Mega-Tokyo message board:
For me, a significant part of old Sierra games is the music, and I'm sure others may agree somewhat. However, I don't have /dev/sequencer support so stock FreeSCI doesn't play music (of course). "If only I could pipe the output into TiMidity, I'd have music!" I thought. Well, the genius behind TiMidity has added the ability to run a TiMidity server that accepts MIDI data as to be sent to /dev/sequencer. "If only there were a way to convince FreeSCI to use this server" I thought. Well guess who again came to the rescue? Yep, Masanao Izumo strikes again. This page [http://www.goice.co.jp/member/mo/timidity/doc/oss-hack.html] has a link to timidity-io.c, a fantastic piece of work that, when built into an application, takes over some syscalls to fake an OSS /dev/ sequencer. Basically, all you have to do is add the lines

SEQ_DEFINEBUF(128);
#define seqbuf_dump timidity_seqbuf_dump

near the top of the file, build it (cc -O2 -c timidity-io.c works) and link it in with the final sciv binary. Fire up the TiMidity server (timidity -ir 7777) and start sciv. You will (should!) be pleasantly surprised when you get high quality MIDI out of your non-MIDI card. Here's another kicker: You don't need to link this into sciv; you can build it as an object that you load before you run FreeSCI. What is great about this is that it works with other OSS apps (I've tested playmidi and kmid, they both work). Just build it like so:

cc -fPIC -O2 -shared -o timidity-io.so timidity-io.c

Call sciv as

LD_PRELOAD=/path/to/timidity-io.so sciv

and it should work great (it does here, anyway). Note that you NEED the path in LD_PRELOAD or it won't work (./ should work fine as a path).

---/Quote 8< ---

[substituting "SCIV" with "DOSBOX" of course]
There is an assortment of timidity sound fonts;
eawpats12_full.rar (25mb); goemon.tar.gz(11mb);
shominst-0409.zip(9mb) etc.

Alternatively while trying to find the source of the reference (sorry can't)
http://linux-sound.org/midi.html has 101 Linux&Midi projects...

(Sorry if this is too much; before Canadacow joined, it was a highly
probable setup which I was working on adding .. but first I have to
revive Linux).

Long story short, you might just want to drop the CPU rate and up the frame rate (less video/keyboard, but better audio).

Reply 3 of 4, by prompt

User metadata
Rank Newbie
Rank
Newbie

- you can start timidity as alsa server with: timidity -iA
- fluidsynth doesn't quit if started with --server option
- SDL-Variables: ftp://ptah.lnf.kth.se/pub/misc/sdl-env-vars
- reduce cpu load to get better sound: start X in 16-bit, add preemtion patch to kernel and enable optimisations when compiling dosbox
- soundfonts: http://www.personalcopy.com/linuxfiles.htm

Reply 4 of 4, by Guest

User metadata

Oke, thanks everyone. I will try all the suggested options, but I have one point to add:
timidity was my first choise, but it wouldn't compile at my system with the alsa sequencer enabled.
It gives an error about undeclared functions in alsaseq_c.c. I use alsa 1.0.1 and I didn't find others with this problem on google unfortunatly. That was the cause I went to fluidsynth.
I'll give the other options a try tommorow.