Hi everyone,
Could someone confirm or please help me figure out why XM or MOD music doesn't play in my game? I try with MP3 or OGG, it works fine. But XMs or MODs don't seem to play at all. I tried from the editor, and I tried on a compiled project. I tried both in Audio.VOX or in main game data.
I tried putting a 'Display' to confirm the code was reached.
aMyMusic.Play();
Display("aMyMusic avail=%d type=%d", aMyMusic.IsAvailable, aMyMusic.Type);
The display said avail=1 type=2.
In the editor, the music plays correctly when double-clicking on it and pressing the 'play' button.
I am using AGS 3.5.1.
Many thanks!
RemV
Could you upload or link a sound file that does not play?
Yes of course: https://api.modarchive.org/downloads.php?moduleid=175335#kc-basslinetech.xm
(This is one example but I tried 3 different songs and neither played.)
Thank you for your reply!
I imported the file in Audio / Music and it played fine.
aKc_basslinetech.Play(); // in room_Load
Hmm I tried in an empty new project and it didn't work. I have modified any properties of the music either :(
Strangely the music plays correct when pressing the 'play' button in the editor so the file is OK.
[imgzoom]https://i.ibb.co/C8F72PQ/XM-not-playing.png[/imgzoom]
Here's the game I used to test it:
https://drive.google.com/file/d/1R0GP0I8SgI3u5uweT3hjjWGzcxr3zlpS/view?usp=sharing
Does that work for you? (Just run it and you should hear the track right away)
Hi
Quote from: Khris on Wed 28/07/2021 23:57:18
Here's the game I used to test it:
https://drive.google.com/file/d/1R0GP0I8SgI3u5uweT3hjjWGzcxr3zlpS/view?usp=sharing
Does that work for you? (Just run it and you should hear the track right away)
Hi Khris,
Yes the music plays correctly in your packaged EXE.
I zipped my almost empty minimal test project which should play the music after the room fade-in:
https://drive.google.com/file/d/1JvkE3_wXl7DJXL-GG5g70a5F2vqNI_F7/view?usp=sharing (https://drive.google.com/file/d/1JvkE3_wXl7DJXL-GG5g70a5F2vqNI_F7/view?usp=sharing)
When I run it, it doesn't play and it displays the displaybox "Channel is null".
Would you be able to try it on your machine?
I can confirm it doesn't work with your game, I have no clue why not though.
The only differences are: you created an empty game in AGS 3.5.1 and I used the Tumbleweed template in 3.5.0. But that shouldn't make a difference.
Edit:
Apparently it does; I created a Sierra game in both 3.5.1 and 3.5.0 and it works with 3.5.0 but not with 3.5.1 (I just downloaded this (https://www.adventuregamestudio.co.uk/forums/index.php?topic=59239.0) version)
Oh, thank you very much.
I am new here but I suppose there is a Bug Report section to inform the Devs about that issue on 3.5.1?
The release notes mention some fixes related to Audio, so maybe the bug was recently introduced but isn't known yet.
I will look into this today.
I made a fix, here's a download link to the temporary Editor build (scroll down for "Artifacts"):
https://cirrus-ci.com/task/6748614169985024
Please tell if that works for you.
Quote from: Crimson Wizard on Thu 29/07/2021 18:57:30
I made a fix, here's a download link to the temporary Editor build (scroll down for "Artifacts"):
https://cirrus-ci.com/task/6748614169985024
Please tell if that works for you.
It works perfectly! 3.5.1.9 it is then! Thank you, this is the world's best customer service game engine to date :)
I will be releasing this patch officially soon.
Quote from: remz on Fri 30/07/2021 00:43:38It works perfectly! 3.5.1.9 it is then! Thank you, this is the world's best customer service game engine to date :)
Also props to you for this being an actual bug and not pebkac :-D