Ref T195, audio utility function

This commit is contained in:
Klaus Basan
2017-11-16 01:58:09 +01:00
parent 075f19268c
commit 31237b758e
3 changed files with 13 additions and 16 deletions

View File

@@ -58,5 +58,14 @@ namespace BlackCore
return new CContextAudioEmpty(runtime); // audio not mandatory
}
}
QString IContextAudio::audioRunsWhereInfo() const
{
if (this->isEmptyObject()) { return "no audio"; }
const CIdentifier i = this->audioRunsWhere();
return this->isUsingImplementingObject() ?
QString("Local audio on '%1', '%2'.").arg(i.getMachineName(), i.getProcessName()) :
QString("Remote audio on '%1', '%2'.").arg(i.getMachineName(), i.getProcessName());
}
} // ns
} // ns

View File

@@ -137,6 +137,9 @@ namespace BlackCore
//! Audio runs where
virtual BlackMisc::CIdentifier audioRunsWhere() const = 0;
//! Info string about audio
QString audioRunsWhereInfo() const;
//! Get current audio device
//! \return input and output devices
virtual BlackMisc::Audio::CAudioDeviceInfoList getCurrentAudioDevices() const = 0;