Adds proper metal and dig sounds

Adds pitch adjustment for metal sounds and dig sounds.
This commit is contained in:
CybertronicToon 2017-02-18 01:30:45 -06:00 committed by GitHub
parent 6b43c396bd
commit c08abee077

View File

@ -51,11 +51,17 @@ namespace ClassicalSharp.Audio {
if (snd == null) return;
chunk.Channels = snd.Channels;
chunk.SampleRate = snd.SampleRate;
chunk.BitsPerSample = snd.BitsPerSample;
chunk.BytesOffset = 0;
chunk.BytesUsed = snd.Data.Length;
chunk.Data = snd.Data;
if (board == digBoard) {
if (type == SoundType.Metal) chunk.SampleRate = (snd.SampleRate * 6) / 5;
else chunk.SampleRate = (snd.SampleRate * 4) / 5;
} else {
if (type == SoundType.Metal) chunk.SampleRate = (snd.SampleRate * 7) / 5;
else chunk.SampleRate = snd.SampleRate;
}
if (snd.Channels == 1) {
PlayCurrentSound(monoOutputs);
@ -144,4 +150,4 @@ namespace ClassicalSharp.Audio {
outputs = null;
}
}
}
}