mirror of
https://github.com/DualTachyon/uv-k5-firmware.git
synced 2024-11-21 05:30:49 +08:00
Fixed missing digit voices.
This commit is contained in:
parent
b636c07536
commit
116025f08b
17
audio.c
17
audio.c
@ -265,19 +265,22 @@ uint8_t AUDIO_SetDigitVoice(uint8_t Index, uint32_t Value)
|
||||
Count = 0;
|
||||
Result = Value / 1000;
|
||||
Remainder = Value % 1000;
|
||||
if (Remainder >= 100) {
|
||||
if (Remainder < 100) {
|
||||
if (Remainder < 10) {
|
||||
goto Skip;
|
||||
}
|
||||
} else {
|
||||
Result = Remainder / 100;
|
||||
gVoiceID[gVoiceWriteIndex++] = Result;
|
||||
Count++;
|
||||
Remainder -= Result * 100;
|
||||
}
|
||||
if (Remainder >= 10) {
|
||||
Result = Remainder / 10;
|
||||
gVoiceID[gVoiceWriteIndex++] = Result;
|
||||
Count += 1;
|
||||
Remainder -= Result * 10;
|
||||
}
|
||||
Result = Remainder / 10;
|
||||
gVoiceID[gVoiceWriteIndex++] = Result;
|
||||
Count++;
|
||||
Remainder -= Result * 10;
|
||||
|
||||
Skip:
|
||||
gVoiceID[gVoiceWriteIndex++] = Remainder;
|
||||
|
||||
return Count + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user