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>
|
|
|
|
|
2013-10-04 08:13:09 -04:00
|
|
|
class QToolButton;
|
2012-02-25 07:18:40 -05:00
|
|
|
|
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();
|
2013-10-20 12:59:29 -04:00
|
|
|
void hangupCall() ;
|
|
|
|
|
2012-02-25 07:18:40 -05:00
|
|
|
|
|
|
|
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
|
|
|
|
2013-10-04 08:13:09 -04:00
|
|
|
QToolButton *audioListenToggleButton ;
|
|
|
|
QToolButton *audioMuteCaptureToggleButton ;
|
2013-10-20 12:59:29 -04:00
|
|
|
QToolButton *hangupButton ;
|
|
|
|
|
2012-02-25 07:18:40 -05:00
|
|
|
};
|
|
|
|
|