refs #335, improved audio setup

* changed volume methods from QList<qint32> to qint32 (DBus compliance)
* methods for changed devices
* command parser for audio
* volume display in status bar (pseudo mute)
This commit is contained in:
Klaus Basan
2014-11-05 16:49:49 +01:00
committed by Roland Winklmeier
parent 3fd1f3c8c4
commit 1ea330cc06
11 changed files with 228 additions and 65 deletions

View File

@@ -118,6 +118,19 @@ namespace BlackCore
//! \copydoc IContextAudio::enableAudioLoopback()
virtual void enableAudioLoopback(bool enable = true) override;
//! \addtogroup commandline
//! @{
//! <pre>
//! .mute mute CContextAudio
//! .unmute unmute CContextAudio
//! .vol .volume volume 0..100 set volume CContextAudio
//! .vol1 .volume1 volume 0..100 set volume COM1 CContextAudio
//! .vol2 .volume2 volume 0..100 set volume COM2 CContextAudio
//! </pre>
//! @}
//! \copydoc IContextAudio::parseCommandLine
virtual bool parseCommandLine(const QString &commandLine) override;
protected:
//! Constructor
CContextAudio(CRuntimeConfig::ContextMode mode, CRuntime *runtime);
@@ -144,6 +157,9 @@ namespace BlackCore
void ps_initNotificationSounds();
private:
const qint32 MinUnmuteVolume = 20; //!< minimum volume when unmuted
const qint32 VoiceRoomEnabledVolume = 95; //!< voice room volume when enabled
//! Connection in transition
bool inTransitionState() const;
@@ -156,6 +172,6 @@ namespace BlackCore
QPointer<IVoiceChannel> m_channelCom1;
QPointer<IVoiceChannel> m_channelCom2;
};
}
} // namespace
#endif // guard