blob: 41b473d3b7fcfa2a9654857bf8ab697535964908 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#include "audiooutput.h"
#include "backend.h"
#include <phonon/audiooutput.h>
QT_BEGIN_NAMESPACE
namespace Phonon
{
namespace Dummy
{
AudioOutput::AudioOutput(Backend *backend, QObject *parent)
: QObject(parent)
{
Q_UNUSED(backend)
m_volumeLevel = 100;
}
AudioOutput::~AudioOutput()
{
}
qreal AudioOutput::volume() const
{
return m_volumeLevel;
}
int AudioOutput::outputDevice() const
{
return m_device;
}
void AudioOutput::setVolume(qreal newVolume)
{
m_volumeLevel = newVolume;
emit volumeChanged(newVolume);
}
bool AudioOutput::setOutputDevice(int newDevice)
{
return (newDevice == 0);
}
bool AudioOutput::setOutputDevice(const AudioOutputDevice &newDevice)
{
return setOutputDevice(newDevice.index());
}
}
} //namespace Phonon::Dummy
QT_END_NAMESPACE
#include "moc_audiooutput.cpp"
|