blob: b386c9fe97115090900abd70a297d88deb1d4ba5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
#ifndef SOUND_H
#define SOUND_H
#include <qdialog.h>
#include <qwidget.h>
#include <qcombobox.h>
#include <qpushbutton.h>
#include <kmainwindow.h>
#ifdef HAVE_SYS_SOUNDCARD_H
# include "oss.h"
#endif
#ifdef HAVE_SUN_AUDIOIO_H
# include "sunaudio.h"
#endif
/* ---------------------------------------------------------------------- */
#define FMT_UNDEFINED 0
#define FMT_8BIT 1 /* unsigned */
#define FMT_16BIT 2 /* signed - native byte order */
#define FMT_MULAW 4 /* NOT SUPPORTED (yet) */
#define FMT_ALAW 8 /* NOT SUPPORTED (yet) */
#define FMT_MAX 2
struct SOUNDPARAMS {
int format;
int channels;
int rate;
int blocksize;
int latency;
};
char *sndfmt2str(int format);
/* ---------------------------------------------------------------------- */
class SoundOptions : public KMainWindow /* QDialog */
{
Q_OBJECT;
public:
SoundOptions(Soundcard *c, const char *name=0);
void set_soundparam(int rate, int channels, int format, int trigger);
virtual void saveProperties(KConfig *config);
virtual void readProperties(KConfig *config);
private:
Soundcard *card;
struct SOUNDPARAMS current;
void set_params();
QComboBox *format;
QComboBox *channels;
QComboBox *rate;
QComboBox *trigger;
QWidget *tab[2][4];
int tabw[2],tabh[4];
QPushButton *ok, *apply, *cancel;
signals:
void set_level(int l);
public slots:
void new_params(struct SOUNDPARAMS *p);
void ok_cb();
void apply_cb();
void cancel_cb();
};
#endif
|