commit 08fc0eb0f84c930367f8eb6ef8f2565ace1d8e29
Author: sylverb <sylver.bruneau@gmail.com>
AuthorDate: Tue Jan 23 18:23:24 2024 +0100
Commit: sylverb <sylver.bruneau@gmail.com>
CommitDate: Tue Jan 23 18:23:24 2024 +0100
Default value for musicChannel speed is 0 not -1 as it's unsigned value
---
source/Audio.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/source/Audio.cpp b/source/Audio.cpp
index 2b9015f..5530d76 100644
--- a/source/Audio.cpp
+++ b/source/Audio.cpp
@@ -168,7 +168,8 @@ void Audio::set_music_pattern(int pattern) {
bool foundNonLooping = false;
// Find music speed; it’s the speed of the fastest sfx
// While we are looping through this, find the lowest *valid* sfx length
- _audioState._musicChannel.master = _audioState._musicChannel.speed = -1;
+ _audioState._musicChannel.master = -1;
+ _audioState._musicChannel.speed = 0;
_audioState._musicChannel.length = 32; //as far as i can tell, there is no way to make an sfx longer than 32.
for (int i = 0; i < 4; ++i)
{