Add Ogg Music to Mod?

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Add Ogg Music to Mod?

Post by Knight Captain »

I'm trying to add an Ogg file to my mod, but I can't find a working example in another mod. It appears the file should be in the si71.ogg name scheme, but where would I place this?

The file plays fine elsewhere.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Add Ogg Music to Mod?

Post by Knight Captain »

Previously using UI_play_music(70, 0) did not play anything, but now it plays the Exult startup music in my SI mod.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Add Ogg Music to Mod?

Post by Knight Captain »

Got it!

File location is:
Exult\silverseed\mods\conquests\data\music\

File name must be in this format:
71si.ogg

Until I added this, playing 71 seemed to play a sound effect.

What's interesting is the Digital Music Pack uses bgnn.ogg for BG, but for SI uses nnsi.ogg.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Add Ogg Music to Mod?

Post by Dominus »

Maybe Simon, who implemented it a decade ago, wanted to make sure that he finds the SI songs right away...
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Add Ogg Music to Mod?

Post by Knight Captain »

The same .ogg file that sounds completely fine when played by other programs sounds artifacted in Exult. That may explain why.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Add Ogg Music to Mod?

Post by Knight Captain »

Seems the default Audio Sample Rate is the issue. If I turn that up from 22050 to either 44100 or 48000 the artifacting disappears.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Add Ogg Music to Mod?

Post by Knight Captain »

Feature request for modern defaults:
https://sourceforge.net/p/exult/feature-requests/201/
Locked