Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/examples/multimedia/audioinput/audioinput.h

    r651 r769  
    4646#include <QPushButton>
    4747#include <QComboBox>
     48
    4849
    4950#include <qaudioinput.h>
     
    5354    Q_OBJECT
    5455public:
    55     AudioInfo(QObject *parent, QAudioInput *device);
     56    AudioInfo();
    5657    ~AudioInfo();
    5758
     
    5960    void stop();
    6061
    61     int LinearMax();
     62   
    6263
    6364    qint64 readData(char *data, qint64 maxlen);
    6465    qint64 writeData(const char *data, qint64 len);
    6566
    66     QAudioInput *input;
    67 
    6867private:
    69     int m_maxValue;
     68    const QAudioFormat m_format;
     69    quint16 m_maxAmplitude;
     70    qreal m_level; // 0.0 <= m_level <= 1.0
    7071
    7172signals:
     
    8182    RenderArea(QWidget *parent = 0);
    8283
    83     void setLevel(int value);
     84    void setLevel( value);
    8485
    8586protected:
     
    8788
    8889private:
    89     int level;
    90     QPixmap pixmap;
     90    level;
     91    QPixmap pixmap;
    9192};
    9293
     
    9899    ~InputTest();
    99100
     101
     102
     103
     104
     105
    100106private slots:
    101107    void refreshDisplay();
    102     void status();
     108    void ();
    103109    void readMore();
    104110    void toggleMode();
    105111    void toggleSuspend();
    106     void state(QAudio::State s);
    107     void deviceChanged(int idx);
     112    void state);
     113    void deviceChanged(int ix);
    108114
    109115private:
    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;
    116121
    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;
    118129
    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;
    124134};
    125135
Note: See TracChangeset for help on using the changeset viewer.