Opened 14 years ago

Closed 14 years ago

#4904 closed defect (fixed)

AGI: No music with the new MIDI patch

Reported by: raziel- Owned by: sev-
Priority: high Component: Engine: AGI
Version: Keywords:
Cc: Game: AGI Fanmade

Description

ScummVM 1.2.0svn50007 (Jun 18 2010 08:09:10) Features compiled in: Vorbis FLAC MP3 RGB zLib

The new patch to use MIDI in AGI does not output any sound. I can see that data is sent to the device (MT-32) but nothing is played. otoh Scumm titles (i.e. Fatty Bear plays nice). Looks like a missing initialization, but thats of course pure speculation

on a side note, all the titles send the version or some ingame message to the display of the MT-32, the AGI patch doesn't do anything like that, so maybe thats whats causing it?

All AGI games i.e. Enclosure, Space Quest 0 - Replicated

AmigaOS4 gcc (GCC) 4.2.4 (adtools build 20090118)

Ticket imported from: #3017908. Ticket imported from: bugs/4904.

Change History (15)

comment:1 by raziel-, 14 years ago

With one of the last commits the whole MIDI/CAMD functionality is gone again

No change in the settings here (Preferred device: CAMD, MIDI device: CAMD) butthe engine has switched back to not send signals, instead it went back to use adlib

Was this intended (maybe switched off due to the missing initialization?) Just checking, no offence

comment:2 by sev-, 14 years ago

What is the current situation? Could you please retest?

comment:3 by raziel-, 14 years ago

ScummVM 1.2.0svn51236 (Jul 24 2010 09:32:25) Features compiled in: Vorbis FLAC MP3 RGB zLib

Unfortunately exactly the same behaviour

Of course i don't have a single idea on how midi is working in particular, but just to give you an idea (as i don't know if you have a MT-32 device). I have the impression that only "MIDI data" is sent to the device (which is reflected on the hardware's display) but no "MIDI commands" which would tell the device what to do with the data...again, this is just an idea which sprung to mind

comment:4 by sev-, 14 years ago

Status: newclosed

comment:5 by sev-, 14 years ago

Of course. I did not reset the MIDI devices before. Now I added the code to do it, please test, it should fix it. If it is not, just add a comment here and we will fix it eventually.

comment:6 by sev-, 14 years ago

Owner: set to sev-
Resolution: fixed

comment:7 by raziel-, 14 years ago

Sorry, still not there

Other games (apart from SCI games) do display the ScummVM revision on the MT-32 display to indicate the program is accessing the device (SCI games display genuine messages) AND change the volume to 100 (i have set it to 20 by default). Nothing happens with AGI games

Maybe the code is still missing the MIDI commands like PLAY NOTE It seems there is still only the notes sent to the device, nothing comes out the speakers

Again, pure speculation

Thank you so far

comment:8 by raziel-, 14 years ago

If i do a manual reset on the device AFTER the game was started in the launcher the music plays

So it seems it is a wrong or missing reset call to the MIDI hardware (?)

comment:9 by sev-, 14 years ago

Resolution: fixed
Status: closednew

comment:10 by sev-, 14 years ago

This bug is nice to get fixed before the release. Raising priority for keeping the track.

comment:11 by sev-, 14 years ago

Priority: normalhigh

comment:12 by raziel-, 14 years ago

Found the problem It's the same behaviour as in bug report 3067148 https://sourceforge.net/tracker/?func=detail&aid=3067148&group_id=37116&atid=418820

The MIDI volume is "copied" in the range from 0-127 and again from 128-256 (where 0 and 128 is the lowest and 127 and 256 the loudest setting) Due to my setup the music level in all games is set to 128, hence i DO get a VERY faint music output which i recently was only able to catch because my cat turned up the volume by accident :-)

Sorry that i haven't caught it before the release, but i think we can savely postpone this fix to the next one, can't we? (I mean, it seems i was the only one stupid enough?)

Someone has to step in and provide a patch ;-) lordhoto did the last one in the mentioned bug report :-)

comment:13 by raziel-, 14 years ago

It works for me when i change line 85 of engines/agi/sound.midi.cpp from memset(_channelVolume, 255, sizeof(_channelVolume)); to memset(_channelVolume, 127, sizeof(_channelVolume));

Also taken from the DRACI bug report

comment:14 by sev-, 14 years ago

Excellent, thank you! The bug has been fixed.

comment:15 by sev-, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.