Showing the changes to interface/src/scripting/AudioDeviceScriptingInterface.cpp (1 of 28 files). Show all
Unified · Split
| @@ -19,13 +19,13 @@ AudioDeviceScriptingInterface* AudioDeviceScriptingInterface::getInstance() { · 18 unmodified lines | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | AudioDeviceScriptingInterface::AudioDeviceScriptingInterface() { |
| 22 | − connect(DependencyManager::get<Audio>().data(), &Audio::muteToggled, | |
| 22 | + connect(DependencyManager::get<AudioClient>().data(), &AudioClient::muteToggled, | |
| 23 | 23 | this, &AudioDeviceScriptingInterface::muteToggled); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | bool AudioDeviceScriptingInterface::setInputDevice(const QString& deviceName) { |
| 27 | 27 | bool result; |
| 28 | − QMetaObject::invokeMethod(DependencyManager::get<Audio>().data(), "switchInputToAudioDevice", | |
| 28 | + QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), "switchInputToAudioDevice", | |
| 29 | 29 | Qt::BlockingQueuedConnection, |
| 30 | 30 | Q_RETURN_ARG(bool, result), |
| 31 | 31 | Q_ARG(const QString&, deviceName)); |
| @@ -35,7 +35,7 @@ bool AudioDeviceScriptingInterface::setInputDevice(const QString& deviceName) { · 3 unmodified lines | ||
| 35 | 35 | |
| 36 | 36 | bool AudioDeviceScriptingInterface::setOutputDevice(const QString& deviceName) { |
| 37 | 37 | bool result; |
| 38 | − QMetaObject::invokeMethod(DependencyManager::get<Audio>().data(), "switchOutputToAudioDevice", | |
| 38 | + QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), "switchOutputToAudioDevice", | |
| 39 | 39 | Qt::BlockingQueuedConnection, |
| 40 | 40 | Q_RETURN_ARG(bool, result), |
| 41 | 41 | Q_ARG(const QString&, deviceName)); |
| @@ -44,50 +44,50 @@ bool AudioDeviceScriptingInterface::setOutputDevice(const QString& deviceName) { · 2 unmodified lines | ||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | QString AudioDeviceScriptingInterface::getInputDevice() { |
| 47 | − return DependencyManager::get<Audio>()->getDeviceName(QAudio::AudioInput); | |
| 47 | + return DependencyManager::get<AudioClient>()->getDeviceName(QAudio::AudioInput); | |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | QString AudioDeviceScriptingInterface::getOutputDevice() { |
| 51 | − return DependencyManager::get<Audio>()->getDeviceName(QAudio::AudioOutput); | |
| 51 | + return DependencyManager::get<AudioClient>()->getDeviceName(QAudio::AudioOutput); | |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | QString AudioDeviceScriptingInterface::getDefaultInputDevice() { |
| 55 | − return DependencyManager::get<Audio>()->getDefaultDeviceName(QAudio::AudioInput); | |
| 55 | + return DependencyManager::get<AudioClient>()->getDefaultDeviceName(QAudio::AudioInput); | |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | QString AudioDeviceScriptingInterface::getDefaultOutputDevice() { |
| 59 | − return DependencyManager::get<Audio>()->getDefaultDeviceName(QAudio::AudioOutput); | |
| 59 | + return DependencyManager::get<AudioClient>()->getDefaultDeviceName(QAudio::AudioOutput); | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | QVector<QString> AudioDeviceScriptingInterface::getInputDevices() { |
| 63 | − return DependencyManager::get<Audio>()->getDeviceNames(QAudio::AudioInput); | |
| 63 | + return DependencyManager::get<AudioClient>()->getDeviceNames(QAudio::AudioInput); | |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | QVector<QString> AudioDeviceScriptingInterface::getOutputDevices() { |
| 67 | − return DependencyManager::get<Audio>()->getDeviceNames(QAudio::AudioOutput); | |
| 67 | + return DependencyManager::get<AudioClient>()->getDeviceNames(QAudio::AudioOutput); | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
| 71 | 71 | float AudioDeviceScriptingInterface::getInputVolume() { |
| 72 | − return DependencyManager::get<Audio>()->getInputVolume(); | |
| 72 | + return DependencyManager::get<AudioClient>()->getInputVolume(); | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | void AudioDeviceScriptingInterface::setInputVolume(float volume) { |
| 76 | − DependencyManager::get<Audio>()->setInputVolume(volume); | |
| 76 | + DependencyManager::get<AudioClient>()->setInputVolume(volume); | |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | void AudioDeviceScriptingInterface::setReverb(bool reverb) { |
| 80 | − DependencyManager::get<Audio>()->setReverb(reverb); | |
| 80 | + DependencyManager::get<AudioClient>()->setReverb(reverb); | |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | void AudioDeviceScriptingInterface::setReverbOptions(const AudioEffectOptions* options) { |
| 84 | − DependencyManager::get<Audio>()->setReverbOptions(options); | |
| 84 | + DependencyManager::get<AudioClient>()->setReverbOptions(options); | |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | void AudioDeviceScriptingInterface::toggleMute() { |
| 88 | − DependencyManager::get<Audio>()->toggleMute(); | |
| 88 | + DependencyManager::get<AudioClient>()->toggleMute(); | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | bool AudioDeviceScriptingInterface::getMuted() { |
| 92 | − return DependencyManager::get<Audio>()->isMuted(); | |
| 92 | + return DependencyManager::get<AudioClient>()->isMuted(); | |
| 93 | 93 | } |