mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-23 12:46:34 -04:00
Adds proper metal and dig sounds
Adds pitch adjustment for metal sounds and dig sounds.
This commit is contained in:
parent
6b43c396bd
commit
c08abee077
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user