Just Intonation  Version 1.3.0 (18)
Explore scale-independent dynamically adapting tuning in just intonation
audioaoutputdevice.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright 2016-2017 Karolin Stange, Christoph Wick, and Haye Hinrichsen
3  *
4  * This file is part of JustIntonation.
5  *
6  * JustIntonation is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * JustIntonation is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with JustIntonation. If not, see http://www.gnu.org/licenses/.
18  *****************************************************************************/
19 
20 //=============================================================================
21 // Audio output device
22 //=============================================================================
23 
24 #ifndef AUDIOOUPUTDEVICE_H
25 #define AUDIOOUPUTDEVICE_H
26 
27 #include <QtMultimedia/QAudioOutput>
28 #include <QThread>
29 
30 #include "audiobase.h"
31 
32 class AudioOutput;
33 
37 
38 class AudioOutputDevice : public QIODevice
39 {
40 public:
41  AudioOutputDevice (AudioOutput* audioplayerthread);
42  bool connect(const AudioDeviceParameters &parameters);
43  void disconnect();
44 
45  void setVolume(double volume);
46 
47 public slots:
48  //void setMute (bool mute) { (void) mute; }
49 
50 private:
51  qint64 readData (char * data, qint64 maxSize) override final;
52  qint64 writeData (const char * data, qint64 maxSize) override final;
53 
56  QAudioOutput* pQtAudioOutputDriver;
57 };
58 
59 #endif // AUDIOOUPUTDEVICE_H
void disconnect()
Stop the audio output device.
AudioOutputDevice(AudioOutput *audioplayerthread)
Constructor, resetting the member variables.
qint64 writeData(const char *data, qint64 maxSize) override final
Empty implementation for writing without functionality.
bool connect(const AudioDeviceParameters &parameters)
qint64 readData(char *data, qint64 maxSize) override final
Read PCM data.
Audio Output Device, supporting 16 and 24 bit signed integer PCM.
int mSampleSize
Sample size in bits (16/24)
QAudioOutput * pQtAudioOutputDriver
Pointer to System-Qt audio driver.
Class for audio output.
Definition: audiooutput.h:45
void setVolume(double volume)
Set the global volume.
AudioOutput * pAudioOutput
Pointer back to AudioOutputThread.