summaryrefslogtreecommitdiffstats
path: root/kmix/mixer_oss4.h
blob: 40f147859b665b38dbe9ed684199b61c881a5af4 (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
//-*-C++-*-

#ifndef MIXER_OSS4_H
#define MIXER_OSS4_H

#include <tqstring.h>

#include "mixer_backend.h"
#include <sys/soundcard.h>

class Mixer_OSS4 : public Mixer_Backend
{
public:
  Mixer_OSS4(int device = -1);
  virtual ~Mixer_OSS4();

  virtual TQString errorText(int mixer_error);
  virtual int readVolumeFromHW( int ctrlnum, Volume &vol );
  virtual int writeVolumeToHW( int ctrlnum, Volume &vol );
  virtual void setEnumIdHW(int ctrlnum, unsigned int idx);
  virtual unsigned int enumIdHW(int ctrlnum);
  virtual bool setRecsrcHW( int ctrlnum, bool on);
  virtual bool isRecsrcHW( int ctrlnum );

protected:

  MixDevice::ChannelType classifyAndRename(TQString &name, int flags);

  int wrapIoctl(int ioctlRet);

  void reinitialize() { open(); close(); };
  virtual int open();
  virtual int close();
  virtual bool needsPolling() { return true; };

  int     m_ossVersion;
  int     m_fd;
  int     m_numExtensions;
  int     m_numMixers;
  TQString m_deviceName;
};
#endif