mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-01-28 22:01:50 +00:00
[Linux] Fix Adaptive mode not working
This commit is contained in:
committed by
Tim Gromeyer
parent
0d582d890b
commit
3023c706bf
@@ -40,13 +40,13 @@ namespace AirPodsPackets
|
||||
|
||||
inline std::optional<NoiseControlMode> parseMode(const QByteArray &data)
|
||||
{
|
||||
char mode = ControlCommand::parseActive(data).value_or(CHAR_MAX);
|
||||
char mode = ControlCommand::parseActive(data).value_or(CHAR_MAX) - 1;
|
||||
if (mode < static_cast<quint8>(NoiseControlMode::MinValue) ||
|
||||
mode > static_cast<quint8>(NoiseControlMode::MaxValue))
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
return static_cast<NoiseControlMode>(mode - 1);
|
||||
return static_cast<NoiseControlMode>(mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user