Page 2 of 2

Posted: Mon Feb 03, 2014 6:25 pm
by aem
Imago wrote:QUOTE (Imago @ Feb 2 2014, 10:13 PM) nope, nothing has changed to break it. just make sure your allegiance CD is in the drive.
I just tested it and it is broken. Though keep in mind we are trying to play .wav's in the artwork folder and not off a CD. Log shows some errors.

Failed to find CD line on mixer 3
Failed to find CD line on mixer 4
Open failed for CD Audio device '': The specified file cannot be played on the specified MCI device. The file may be corrupt, not in the correct format, or no file handler available for this format.
Directsound driver is not certified by Microsoft and is not emulated.
The primary buffer can be 8 bit 16 bit mono stereo.
The secondary buffers can range continuously from 100 Hz to 200000 Hz, and can be 8 bit 16 bit mono stereo.
There is hardware support for mixing 1 buffers, including 1 static and 1 streaming buffers.
There is hardware support for 0 3D buffers, including 0 static 3D and 0 streaming 3D buffers.
Time reading sounds: 919 ms
Time initializing sound: 1201 ms

Tested with R5 Allegiance.exe and works fine. Some R6 update appears to have broken support for the built in music player.

Posted: Tue Feb 04, 2014 12:34 am
by French_Touch
Thanks for your feedback. I think I will have to use another player... too bad!

Posted: Tue Feb 04, 2014 1:04 am
by aem
French_Touch wrote:QUOTE (French_Touch @ Feb 3 2014, 05:34 PM) Thanks for your feedback. I think I will have to use another player... too bad!
For now it appears that way. I am going to try to track down what change broke this though as this is a feature I really like.

Posted: Tue Feb 04, 2014 4:39 pm
by aem
OK I tracked down the error. You can get this to work (see bottom of post), but Allegiance is currently not looking in the correct place for wav files. pkk broke it a long time ago and apparently no one ever noticed? The in-game music through musicdef.mdl is a feature I really like. No one else puts their own music into the game?

http://trac.alleg.net/changeset/600/allegsvn is the update that introduced the issue.

While removing SoundPack support, pkk mistakenly set Allegiance to look in the folder above the artwork directory for wav files.

ZString strFilename = m_pmodeler->GetArtPath() + "\\..\\" + pstring->GetValue() + ".wav";

should be..

ZString strFilename = m_pmodeler->GetArtPath() + "\\" + pstring->GetValue() + ".wav";

Workaround:
You can either put the wav files in the same folder as Allegiance.exe (Production and/or Beta Folders) OR this does in fact support ogg files which look in the correct directory (Production/Artwork or Beta/Artwork).

So move the wav files or use ogg files and you should hear your music :thumbsup:

If using WAV files I'd keep a copy of them in the Artwork folder as well as I am going to see about getting the code fixed and hopefully into the Beta soon and Production whenever next update is pushed out.

Posted: Tue Feb 04, 2014 11:07 pm
by French_Touch
I'll try this, thank you for putting efforts into it!