Changeset 769 for trunk/examples/multimedia/audioinput/audioinput.h
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/examples/multimedia/audioinput/audioinput.h
r651 r769 46 46 #include <QPushButton> 47 47 #include <QComboBox> 48 48 49 49 50 #include <qaudioinput.h> … … 53 54 Q_OBJECT 54 55 public: 55 AudioInfo( QObject *parent, QAudioInput *device);56 AudioInfo(); 56 57 ~AudioInfo(); 57 58 … … 59 60 void stop(); 60 61 61 int LinearMax();62 62 63 63 64 qint64 readData(char *data, qint64 maxlen); 64 65 qint64 writeData(const char *data, qint64 len); 65 66 66 QAudioInput *input;67 68 67 private: 69 int m_maxValue; 68 const QAudioFormat m_format; 69 quint16 m_maxAmplitude; 70 qreal m_level; // 0.0 <= m_level <= 1.0 70 71 71 72 signals: … … 81 82 RenderArea(QWidget *parent = 0); 82 83 83 void setLevel( intvalue);84 void setLevel( value); 84 85 85 86 protected: … … 87 88 88 89 private: 89 intlevel;90 QPixmap pixmap;90 level; 91 QPixmap pixmap; 91 92 }; 92 93 … … 98 99 ~InputTest(); 99 100 101 102 103 104 105 100 106 private slots: 101 107 void refreshDisplay(); 102 void status();108 void (); 103 109 void readMore(); 104 110 void toggleMode(); 105 111 void toggleSuspend(); 106 void state (QAudio::State s);107 void deviceChanged(int i dx);112 void state); 113 void deviceChanged(int ix); 108 114 109 115 private: 110 AudioInfo *audioinfo; 111 QAudioDeviceInfo device; 112 QAudioFormat format; 113 QAudioInput *audioInput; 114 QIODevice *input; 115 RenderArea *canvas; 116 // Owned by layout 117 RenderArea *m_canvas; 118 QPushButton *m_modeButton; 119 QPushButton *m_suspendResumeButton; 120 QComboBox *m_deviceBox; 116 121 117 bool pullMode; 122 QAudioDeviceInfo m_device; 123 AudioInfo *m_audioInfo; 124 QAudioFormat m_format; 125 QAudioInput *m_audioInput; 126 QIODevice *m_input; 127 bool m_pullMode; 128 QByteArray m_buffer; 118 129 119 QPushButton *button; 120 QPushButton *button2; 121 QComboBox *deviceBox; 122 123 char *buffer; 130 static const QString PushModeLabel; 131 static const QString PullModeLabel; 132 static const QString SuspendLabel; 133 static const QString ResumeLabel; 124 134 }; 125 135
Note:
See TracChangeset
for help on using the changeset viewer.