summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/audiooutput/audiooutput.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/audiooutput/audiooutput.h')
-rw-r--r--examples/multimedia/audiooutput/audiooutput.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/examples/multimedia/audiooutput/audiooutput.h b/examples/multimedia/audiooutput/audiooutput.h
index ac24a61..5bf8091 100644
--- a/examples/multimedia/audiooutput/audiooutput.h
+++ b/examples/multimedia/audiooutput/audiooutput.h
@@ -41,8 +41,6 @@
#include <math.h>
-#define BUFFER_SIZE 32768
-
#include <QObject>
#include <QMainWindow>
#include <QIODevice>
@@ -83,19 +81,26 @@ public:
~AudioTest();
private:
- QAudioDeviceInfo m_device;
- Generator* m_generator;
- QAudioOutput* m_audioOutput;
- QIODevice* m_output;
- QTimer* m_timer;
- QAudioFormat m_format;
-
- bool m_pullMode;
- char* m_buffer;
-
- QPushButton* m_modeButton;
- QPushButton* m_suspendResumeButton;
- QComboBox* m_deviceBox;
+ void initializeWindow();
+ void initializeAudio();
+ void createAudioOutput();
+
+private:
+ QTimer* m_timer;
+
+ // Owned by layout
+ QPushButton* m_modeButton;
+ QPushButton* m_suspendResumeButton;
+ QComboBox* m_deviceBox;
+
+ QAudioDeviceInfo m_device;
+ Generator* m_generator;
+ QAudioOutput* m_audioOutput;
+ QIODevice* m_output; // not owned
+ QAudioFormat m_format;
+
+ bool m_pullMode;
+ QByteArray m_buffer;
private slots:
void status();