- CStdString strLog;
- strLog.Format("<< %x -> %x: system audio mode '%s'", m_iLogicalAddress, dest, CCECCommandHandler::ToString(m_systemAudioStatus));
- AddLog(CEC_LOG_NOTICE, strLog);
-
- cec_command command;
- cec_command::Format(command, m_iLogicalAddress, dest, CEC_OPCODE_SYSTEM_AUDIO_MODE_STATUS);
- command.parameters.PushBack((uint8_t) m_systemAudioStatus);
+ cec_system_audio_status state;
+ {
+ CLockObject lock(&m_writeMutex);
+ CStdString strLog;
+ strLog.Format("<< %x -> %x: system audio mode '%s'", m_iLogicalAddress, dest, ToString(m_systemAudioStatus));
+ AddLog(CEC_LOG_NOTICE, strLog);
+ state = m_systemAudioStatus;
+ }