Fixed maximum audio for MDUV3x0 out of bounds

This commit is contained in:
Morgan Diepart 2025-06-28 17:16:39 +02:00 committed by silseva
parent 359c29592b
commit 6cd4583677
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ static void *audio_thread(void *arg)
if(state.volume != oldVolume) if(state.volume != oldVolume)
{ {
// Apply new volume level, map 0 - 255 range into -31 to 31 // Apply new volume level, map 0 - 255 range into -31 to 31
int8_t gain = ((int8_t) (state.volume / 4)) - 31; int8_t gain = ((int8_t) (state.volume / 4)) - 32;
C6000.setDacGain(gain); C6000.setDacGain(gain);
oldVolume = state.volume; oldVolume = state.volume;