mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 18:25:37 +08:00
Ref T195, audio utility function
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user