2012-02-25 07:18:40 -05:00
|
|
|
#include <QObject>
|
|
|
|
#include <QGraphicsEffect>
|
|
|
|
#include <gui/SpeexProcessor.h>
|
|
|
|
#include <gui/chat/PopupChatDialog.h>
|
|
|
|
#include <gui/audiodevicehelper.h>
|
|
|
|
|
|
|
|
class QPushButton;
|
|
|
|
|
2012-10-21 17:38:55 -04:00
|
|
|
#define VOIP_SOUND_INCOMING_CALL "VOIP_incoming_call"
|
|
|
|
|
2012-02-25 07:18:40 -05:00
|
|
|
class AudioPopupChatDialog: public PopupChatDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
AudioPopupChatDialog(QWidget *parent = NULL);
|
|
|
|
|
|
|
|
virtual ~AudioPopupChatDialog()
|
|
|
|
{
|
|
|
|
if(inputDevice != NULL)
|
|
|
|
inputDevice->stop() ;
|
|
|
|
}
|
|
|
|
|
2012-02-25 16:03:06 -05:00
|
|
|
void addAudioData(const QString name, QByteArray* array) ;
|
2012-02-25 07:18:40 -05:00
|
|
|
private slots:
|
|
|
|
void toggleAudioListen();
|
|
|
|
void toggleAudioMuteCapture();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void sendAudioData();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
QAudioInput* inputDevice;
|
|
|
|
QAudioOutput* outputDevice;
|
|
|
|
QtSpeex::SpeexInputProcessor* inputProcessor;
|
|
|
|
QtSpeex::SpeexOutputProcessor* outputProcessor;
|
|
|
|
|
2012-03-10 19:22:25 -05:00
|
|
|
virtual void updateStatus(int status) ;
|
2012-02-25 07:18:40 -05:00
|
|
|
|
|
|
|
QPushButton *audioListenToggleButton ;
|
|
|
|
QPushButton *audioMuteCaptureToggleButton ;
|
|
|
|
};
|
|
|
|
|