Special Aircraft Service

Battlefield - Airborne - Tactical (BAT) => BAT Tech Help => Topic started by: proweather on February 23, 2017, 09:36:29 PM

Title: Sound Files in Proper Format Won't Play [solved]
Post by: proweather on February 23, 2017, 09:36:29 PM
I put some new music files in the samples/music/menu folder to replace some of the ones that came with B.A.T. They are the RAF theme, the Polish theme, and the French theme. I also added a song for Germany (Postwar). But none of these songs work in-game.

I converted each song to .mp3 in 32 kbps and 11025 khz, then added the RIFF-WAV header. Each file is 1 MB or smaller, and these settings have worked for other files.

Here is the link to the files:

https://www.mediafire.com/?1x6k1zp8yvzvmxe

And here is the log:

Code: [Select]
SIMD render [X]num channels 16ERROR !mp3 stream error samples/music/menu/fr.wavexception at <67>ERROR !mp3 stream error samples/music/menu/fr.wavexception at <67>exception at <67>ERROR !mp3 stream error samples/music/menu/gb.wavERROR !mp3 stream error samples/music/menu/gb.wavERROR !mp3 stream error samples/music/menu/gb.wav[Feb 24, 2017 4:32:15 AM] -------------- END log session -------------
For some reason, the log never mentions Germany (Postwar)'s theme and Poland's theme, even though I stay on their menus and listen for 10-15 seconds. Any help would be greatly appreciated!

Thanks!

Title: Re: Sound Files in Proper Format Won't Play
Post by: proweather on February 28, 2017, 09:45:59 PM
.....so, is my problem unfixable?
Title: Re: Sound Files in Proper Format Won't Play
Post by: Stainless on March 01, 2017, 03:13:01 AM
I haven't looked at sound in the game, but I have had a lot of problems with wav files.

People think that because a sound effect is a wav, it will just work, but often it doesn't.

Wav is not ONE format, it's a bunch of formats in a common wrapper.

So you can have 8 bit samples replayed at 8 KHz or 128 bit samples played at 44KHz and still have a wav file.

You also can have many different compression systems wrapped up in a wav file, not all of them are supported by all players. It's a bit of a nightmare.

Looking at your files they are compressed data, but that's all I can tell you because even audacity cannot load them.

I would load your original files into a well known tool like audacity, then re-save them. I think you screwed something up when converting them to wav

aaaahhhhhh actually I see what you have done, you have just renamed them to wav from mp3..... that won't work

Title: Re: Sound Files in Proper Format Won't Play
Post by: western0221 on March 01, 2017, 03:36:17 AM
I've not made or tested music files for IL-2 1946, but I heard that format is "RIFF/WAV MP3".

Its internal encode is MP3, but its header has RIFF's Summary Information Field and filename's extension is ".wav".

1st post's generating steps look OK for me.
Um...
- 11025 Hz is supported by IL-2 1946 as RIFF/WAV MP3 ?
Title: Re: Sound Files in Proper Format Won't Play
Post by: Stainless on March 01, 2017, 05:06:09 AM
He just took an mp3 file and changed the file extension to .wav, so they are not wav files.

I checked by loading the ".wav" file in audacity, it failed to load. I then changed the file extension to ".mp3" and audacity loaded it.

They are not wav files.
Title: Re: Sound Files in Proper Format Won't Play
Post by: western0221 on March 01, 2017, 05:35:33 AM
Stock game's samples/Music/Menu/*.wav are in the format of "RIFF WAVE (mp3)" / "MPEG-1.0, Layer-3" / "BitRate 192kbps (CBR) / "SampleRate 44100 Hz" / "Mode Stereo".

proweather's files are in "RIFF WAVE (mp3)" , but "MPEG-2.5, Layer-3" by a music player apps.
So, in encoding MP3 data by some tool, How about forcing the tool to use old "MPEG-1.0, Layer-3" , instead of newer "MPEG-2.5, Layer-3".
Title: Re: Sound Files in Proper Format Won't Play
Post by: Stainless on March 01, 2017, 09:15:13 AM
That sounds a good plan.
Title: Re: Sound Files in Proper Format Won't Play
Post by: proweather on March 05, 2017, 07:11:43 PM
Will someone convert these files to the proper sound file format for Il-2? My copy of Audacity isn't working properly. Thanks!

https://www.mediafire.com/?kdn9bbz3i65drg1