WAVE (.wav) files

About PR usage and development, and about the POP format.
Post Reply
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

WAVE (.wav) files

Post by Norbert »

I've been trying to get a custom .wav file to work in PoP1 for DOS.

I'm currently using sox to convert the new .wav file I have into something usable for PoP1.

What I expected to work is this:

Code: Select all

sox in.wav -e unsigned-integer -r 11025 -c 1 -b 8 out.wav
Because mplayer says about the original .wav file:

Code: Select all

AO: [pulse] 11025Hz 1ch u8 (1 bytes per sample)
Apparently that doesn't work.
I've also tried -e a-law, -e u-law.

Then I checked the original .wav file in audacity and it says:

Code: Select all

Mono, 11025Hz
32-bit float
So I tried:

Code: Select all

sox in.wav -e floating-point -r 11025 -c 1 -b 32 out.wav
Also didn't work.

It's interesting that nobody seems to have written about this before, yet several people have used custom sound effects in their mods.

What is the correct sox command to convert to a .wav file format that PoP1 for DOS understands and plays?
Does anyone know? :?
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: WAVE (.wav) files

Post by David »

Norbert wrote:

Code: Select all

AO: [pulse] 11025Hz 1ch u8 (1 bytes per sample)
This is the correct.
Norbert wrote:Then I checked the original .wav file in audacity and it says:

Code: Select all

Mono, 11025Hz
32-bit float
Audacity converts all files to 32-bit float by default. (This can be changed at Edit->Preferences->Quality->Default Sample Format)

However, the problem is that waves in DAT files have headers that store the sample size, sample rate, and sample count.
See here: viewtopic.php?p=4926#p4926
So this is next thing to fix in PR...
Norbert wrote:several people have used custom sound effects in their mods.
Which mods are they? I searched popot.org for all mods with changed audio, but none of them seem to have different DIGISND#.DAT files from the originals (1.0 or sometimes 1.3). (Actually, they only changed the MIDISND#.DAT files, except Arabian Nightmares, which has the original 1.3 files.)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: WAVE (.wav) files

Post by Norbert »

David wrote:So this is next thing to fix in PR...
Wow, I didn't know that.
That explains why what I was trying isn't working (yet).
So, we're venturing into new territory... :D
You are smart for your age, by the way. (General remark, not specifically about your last post.)
David wrote:
Norbert wrote:several people have used custom sound effects in their mods.
Which mods are they?
I thought I heard different sound effects in, for example, Lost In The Forest?
But I'm probably mistaken, since you compared the actual DAT files with the originals and didn't find differences.
[Edit: Ah, it does sound different, but that's because the mod has the sound device set to PC Speaker.]

I've unchecked the audio checkbox for Arabian Nightmares.
Post Reply