HulaLoop
Simple cross-platform audio loopback and recording.
Device.h
1 #ifndef HL_DEVICE_H
2 #define HL_DEVICE_H
3 
4 #include <cstdint>
5 #include <string>
6 #include <vector>
7 
8 namespace hula
9 {
14  enum DeviceType
15  {
16  RECORD = 1,
17  PLAYBACK = 2,
18  LOOPBACK = 4
19  };
20 
24  union DeviceID
25  {
26  std::string linuxID;
27  uint32_t *windowsID;
28  int osxID;
29  };
30 
34  class Device {
35  private:
36  uint32_t *deviceID;
37  std::string deviceName;
38 
39  DeviceType type;
40 
41  public:
42  Device(uint32_t *id, std::string name, DeviceType t);
43  ~Device();
44 
45  uint32_t *getID();
46 
47  std::string getName();
48 
49  DeviceType getType();
50 
51  static void deleteDevices(std::vector<Device *> devices);
52  };
53 }
54 
55 #endif // END HL_DEVICE_H
Wrapper for OS specific device information.
Definition: Device.h:34
Definition: Controller.h:11
Union for the three types of device ID.
Definition: Device.h:24