sensorfw
alsadaptor-ascii.h
Go to the documentation of this file.
1 
32 #ifndef ALSADAPTOR_ASCII_H
33 #define ALSADAPTOR_ASCII_H
34 
35 #include <QObject>
36 #include <QString>
37 #include "sysfsadaptor.h"
38 #include "deviceadaptorringbuffer.h"
40 
41 class ALSAdaptorAscii : public SysfsAdaptor
42 {
43  Q_OBJECT;
44 public:
45  static DeviceAdaptor* factoryMethod(const QString& id)
46  {
47  return new ALSAdaptorAscii(id);
48  }
49 
50 protected:
51  ALSAdaptorAscii(const QString& id);
53 
54  virtual bool setStandbyOverride(const bool override) { Q_UNUSED(override); return false; }
55 private:
56 
57  void processSample(int pathId, int fd);
58  char buf[16];
59 
60  DeviceAdaptorRingBuffer<TimedUnsigned>* alsBuffer_;
61 };
62 
63 #endif
ALSAdaptorAscii(const QString &id)
static DeviceAdaptor * factoryMethod(const QString &id)
virtual bool setStandbyOverride(const bool override)
Datatype for unsigned values.