Проблема с ALSA
Помогите пожалуйста, куда копать?
При изменении Volume - segmentation fault
Исходники .......
pro.pro
TARGET = pro
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp \
alsa.cpp
HEADERS += mainwindow.h \
alsa.h
FORMS +=
LIBS += -lasound
#ifndef __ALSA_H__
#define __ALSA_H__
#include <qobject.h>
#include <qstring.h>
#include <qmap.h>
#include <QDebug>
#include <alsa/asoundlib.h>
#define REPORT qDebug() << sig << ' '
class alsaMixer
{
public:
alsaMixer();
virtual ~alsaMixer(void);
virtual int probeDevices(void);
virtual int setVolume(int LetftChannel, int RightChannel);
virtual int volumeLeft(void);
virtual int volumeRight(void);
virtual int setMuted(bool mute);
virtual bool muted(void);
private:
int useCardMixerElement(const QString &HCTL_id, QString &mixer_element);
snd_mixer_t *attachMixer(const QString &HCTL_id);
int detachMixer(snd_mixer_t *mixer, const char *HCTL_id);
int loadMixerElements(snd_mixer_t *mixer);
QMap<int, QString> probed_cards;
QMap<snd_mixer_elem_t *, QString> mixer_elements;
QString active_HCTL;
QString active_mixer_element;
snd_mixer_t *active_mixer;
snd_mixer_elem_t *active_element;
int volume_left, volume_right;
bool muted_flag;
};
#endif
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QtCore>
#include <QtGui>
#include <QDebug>
#include "alsa.h"
class alsaMixer;
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
QSlider *volumeSlider;
alsaMixer *amixer;
private slots:
void setVolume(int volume);
};
#endif // MAINWINDOW_H