diff --git a/MiniDSP.cpp b/MiniDSP.cpp index d612d55f..c9ec3e62 100644 --- a/MiniDSP.cpp +++ b/MiniDSP.cpp @@ -183,7 +183,7 @@ void MiniDSP::setVolumeDB(float volumeDB) const { return; } - uint8_t SetVolumeCommand[] = {0x42, (int)-2*volumeDB}; + uint8_t SetVolumeCommand[] = {0x42, (uint8_t)(-2*volumeDB)}; SendCommand(SetVolumeCommand, sizeof(SetVolumeCommand)); }