HulaLoop
Simple cross-platform audio loopback and recording.
HulaAudioSettings.h
1 #ifndef HL_AUDIO_SETTINGS_H
2 #define HL_AUDIO_SETTINGS_H
3 
4 #include <string>
5 
6 namespace hula
7 {
13  enum Encoding
14  {
15  WAV, MP3
16  };
17 
22  private:
26  static HulaAudioSettings *hlaudio_instance;
27 
28  bool showRecordDevices;
29 
30  int numberOfChannels;
31  int sampleRate;
32  int sampleSize;
33 
34  std::string defaultInputDeviceName;
35  std::string defaultOutputDeviceName;
36 
37  std::string outputFilePath;
38  Encoding outputFileEncoding;
39 
40  double delayTimer;
41  double recordDuration;
42 
43  protected:
45 
46  public:
48 
53  bool getShowRecordDevices();
54 
55  int getNumberOfChannels();
56  int getSampleRate();
57  int getSampleSize();
58 
59  std::string getDefaultInputDeviceName();
60  std::string getDefaultOutputDeviceName();
61 
62  std::string getOutputFilePath();
63  Encoding getOutputFileEncoding();
64 
65  double getDelayTimer();
66  double getRecordDuration();
67 
72  void setShowRecordDevices(bool);
73 
74  void setNumberOfChannels(int);
75  void setSampleRate(int);
76  void setSampleSize(int);
77 
78  void setDefaultInputDeviceName(std::string);
79  void setDefaultOutputDeviceName(std::string);
80 
81  void setOutputFilePath(std::string);
82  void setOutputFileEncoding(Encoding);
83 
84  void setDelayTimer(double);
85  void setRecordDuration(double);
86 
88  };
89 }
90 
91 #endif // END HL_AUDIO_SETTINGS_H
int getNumberOfChannels()
Get the number of channels for the current global device configuration.
Definition: HulaAudioSettings.cpp:70
void setDelayTimer(double)
Set the length of the delay timer in seconds.
Definition: HulaAudioSettings.cpp:269
void setRecordDuration(double)
Get the length of the record in seconds.
Definition: HulaAudioSettings.cpp:280
void setOutputFilePath(std::string)
Set the path of the output file specified at startup or during the file save routine.
Definition: HulaAudioSettings.cpp:246
void setSampleRate(int)
Set the number of channels for the current global device configuration.
Definition: HulaAudioSettings.cpp:200
void setShowRecordDevices(bool)
Setters.
Definition: HulaAudioSettings.cpp:174
int getSampleSize()
Get the sample size for the current global device configuration.
Definition: HulaAudioSettings.cpp:96
std::string getOutputFilePath()
Get the path of the output file specified at startup or during the file save routine.
Definition: HulaAudioSettings.cpp:129
void setDefaultInputDeviceName(std::string)
Set the name of the device that should be initially selected for record.
Definition: HulaAudioSettings.cpp:224
double getRecordDuration()
Get the length of the record in seconds.
Definition: HulaAudioSettings.cpp:163
std::string getDefaultInputDeviceName()
Get the name of the device that should be initially selected for record.
Definition: HulaAudioSettings.cpp:107
int getSampleRate()
Get the number of channels for the current global device configuration.
Definition: HulaAudioSettings.cpp:83
HulaAudioSettings()
Private constructor to enforce the singleton pattern.
Definition: HulaAudioSettings.cpp:12
void setDefaultOutputDeviceName(std::string)
Set the name of the device that should be initially selected for playback.
Definition: HulaAudioSettings.cpp:235
void setSampleSize(int)
Set the sample size for the current global device configuration.
Definition: HulaAudioSettings.cpp:213
Definition: Controller.h:11
std::string getDefaultOutputDeviceName()
Get the name of the device that should be initially selected for playback.
Definition: HulaAudioSettings.cpp:118
void setNumberOfChannels(int)
Set the number of channels for the current global device configuration.
Definition: HulaAudioSettings.cpp:187
bool getShowRecordDevices()
Getters.
Definition: HulaAudioSettings.cpp:57
void setOutputFileEncoding(Encoding)
Set the output encoding for the current global configuration.
Definition: HulaAudioSettings.cpp:259
Encoding getOutputFileEncoding()
Get the output encoding for the current global configuration.
Definition: HulaAudioSettings.cpp:142
static HulaAudioSettings * getInstance()
Retreive the singular instance of HulaSettings or construct a new one if none exists.
Definition: HulaAudioSettings.cpp:41
~HulaAudioSettings()
Destructor for HulaAudioSettings.
Definition: HulaAudioSettings.cpp:288
Class containing all settings pertinent to the audio module.
Definition: HulaAudioSettings.h:21
double getDelayTimer()
Get the length of the delay timer in seconds.
Definition: HulaAudioSettings.cpp:152