⚠ Cookies ⚠

By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.

Projects

AGS EngineAudioDisable MIDI entirely
RadiantMany AGS games these days don't use MIDI music, but instead use MP3/OGG. Nevertheless, by default AGS initializes a MIDI driver, which may in uncommon situations fail (as some computers just can't handle MIDI for whatever reason).

I would like to request an option, either in the game properties tab in the editor, or by writing it manually in the [disabled] section of acsetup.cfg, to disable MIDI entirely. If this is set, the pulldown for MIDI in the winsetup should be disabled (grayed out) and the game should not attempt to initialize the MIDI driver; any functions that attempt to play MIDI music should simply fail and return false.

(note that selecting 'disable music' in the MIDI pulldown disables [i]all[/i] music, including MP3/OGG, so this isn't the option we're looking for)
RadiantThinking about it some more, a better (and simpler) approach would probably be the following:

Currently, if you use winsetup to disable MIDI music, the engine disables all music. Expected behavior would be for PlayMusic() and related functions to still work with OGG and MP3 music.
RadiantFurthermore, on Mac/Linux systems this can cause the error "DIGMID patch not found", which apparently disables all music.
RadiantThe logs also contain the line "Initializing MOD/XM player". I would suggest that, unless the project file actually contains a MOD or XM file, this step is skipped. Likewise, I would suggest that, unless the project actually contains a MIDI file, the MIDI driver doesn't initialize. Most games use only MP3/OGG music, after all, and there's no need to load a separate player (which may not be installed on some systems) if the game doesn't actually use it.
Crimson Wizard[quote author=Radiant link=issue=552.com1110#com1110 date=1397684195]
(note that selecting 'disable music' in the MIDI pulldown disables [i]all[/i] music, including MP3/OGG, so this isn't the option we're looking for)
[/quote]

I had to test this out because it sounds like a separate issue. But I do not observe this behavior (tried AGS 3.2.1, 3.3.4).

[quote author=Radiant link=issue=552.com1114#com1114 date=1398162124]
Currently, if you use winsetup to disable MIDI music, the engine disables all music. Expected behavior would be for PlayMusic() and related functions to still work with OGG and MP3 music.
[/quote]
Does it happen specifically with PlayMusic()? I tried AudioClip.Play() so far, gotta test that too.

[b]EDIT[/b]: Right, this happens with PlayMusic().

Ironically I fixed this for 3.3.4 just couple of days ago:
[quote]
- Fixed MIDI music refuses to start if digital sound is disabled.
[/quote]
Crimson WizardAGS 3.3.4 now tries to run with MIDI disabled, if it failed. But I do not have full confidence in this solution. It must be tested more.
RadiantMy preference would be to have an option in game properties to Enable MIDI (true/false). These days, most games can be expected to use OGG/MP3 music instead, so they can leave it disabled and have the engine skip all MIDI-related functionality.
© Adventure Game Studio 2024. Page design by loominous and Darth Mandarb; coding by AGA.
Page generated on 07 May 2024 at 04:30:11