Bug 148395

Summary: MIDI support broken in scummvm?
Product: [openSUSE] SUSE Linux 10.1 Reporter: Stefan Dirsch <sndirsch>
Component: OtherAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P2 - High CC: tiwai
Version: Beta 3   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stefan Dirsch 2006-02-06 14:51:19 UTC
$HOME/.scummvmrc
[scummvm]
versioninfo=0.8.2

[sky]
amiga=false
description=Beneath a Steel Sky
fullscreen=false
path=/usr/share/games/BASS/

[queen]
amiga=false
description=Flight of the Amazon Queen
fullscreen=false
path=/usr/share/games/FOTAQ/

# SCUMMVM_PORT=65:0 scummvm -e alsa sky
Looking for sky
Trying to start game 'Beneath a Steel Sky'
Found BASS version v0.0348 (1445 dnr entries)
Can't subscribe to MIDI port (65:0) see README for help!

# SCUMMVM_PORT=65:0 scummvm -e alsa queen
Looking for queen
Trying to start game 'Flight of the Amazon Queen'
Can't subscribe to MIDI port (65:0) see README for help
scummvm: queen/bankman.cpp:121: Queen::BobFrame* Queen::BankManager::fetchFrame(uint32): Assertion `pbf->data != 0' failed.
Aborted
Comment 1 Stefan Dirsch 2006-02-06 14:56:38 UTC
But it seems to work with timidity ...

# timidity -iAqqq -Os1S -N0 &
# aconnect -ol | grep '^client.*TiMidity' | \
  sed -e s'/^client \([0-9]\+\):.*/\1/'
128
# SCUMMVM_PORT=128:0 scummvm -e alsa queen
Looking for queen
Trying to start game 'Flight of the Amazon Queen'
Connected to Alsa sequencer client [128:0]
ALSA client initialised [129:0]
[...]

# SCUMMVM_PORT=128:0 scummvm -e alsa sky
Looking for sky
Trying to start game 'Beneath a Steel Sky'
Found BASS version v0.0348 (1445 dnr entries)
Connected to Alsa sequencer client [128:0]
ALSA client initialised [129:0]
[...]
Comment 2 Stefan Dirsch 2006-02-06 15:00:21 UTC
This is on machine 'shannon'.
Comment 3 Stefan Dirsch 2006-02-06 16:24:03 UTC
Although I installed the soundfonts now, it still does not work. :-(

# cat /proc/asound/card0/wavetableD1
Device: Emu10k1
Ports: 4
Addresses: 17:0 17:1 17:2 17:3
Use Counter: 0
Max Voices: 64
Allocated Voices: 0
Memory Size: 134217728
Memory Available: 126291620
Allocated Blocks: 639
SoundFonts: 3
Instruments: 2342
Samples: 638
Locked Instruments: 2342
Locked Samples: 638

Comment 4 Stefan Dirsch 2006-02-06 17:01:13 UTC
Fix:

-               export SCUMMVM_PORT=65:0
+               client=`aconnect -ol | grep '^client.*WaveTable' | \
+                       sed -e s'/^client \([0-9]\+\):.*/\1/'`
+               if [ -n "$client" ]; then
+                   export SCUMMVM_PORT=${client}:0
+               fi
Comment 5 Stefan Dirsch 2006-02-06 17:35:15 UTC
FOTAQ and BASS start scripts fixed for Beta4.