mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-24 05:10:42 -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;
|
if (snd == null) return;
|
||||||
|
|
||||||
chunk.Channels = snd.Channels;
|
chunk.Channels = snd.Channels;
|
||||||
chunk.SampleRate = snd.SampleRate;
|
|
||||||
chunk.BitsPerSample = snd.BitsPerSample;
|
chunk.BitsPerSample = snd.BitsPerSample;
|
||||||
chunk.BytesOffset = 0;
|
chunk.BytesOffset = 0;
|
||||||
chunk.BytesUsed = snd.Data.Length;
|
chunk.BytesUsed = snd.Data.Length;
|
||||||
chunk.Data = snd.Data;
|
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) {
|
if (snd.Channels == 1) {
|
||||||
PlayCurrentSound(monoOutputs);
|
PlayCurrentSound(monoOutputs);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user