HulaLoop
Simple cross-platform audio loopback and recording.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
hula::HulaAudioSettings Class Reference

Class containing all settings pertinent to the audio module. More...

#include <HulaAudioSettings.h>

Inheritance diagram for hula::HulaAudioSettings:
Inheritance graph
[legend]

Public Member Functions

bool getShowRecordDevices ()
 Getters. More...
 
int getNumberOfChannels ()
 Get the number of channels for the current global device configuration. More...
 
int getSampleRate ()
 Get the number of channels for the current global device configuration. More...
 
int getSampleSize ()
 Get the sample size for the current global device configuration. More...
 
std::string getDefaultInputDeviceName ()
 Get the name of the device that should be initially selected for record. More...
 
std::string getDefaultOutputDeviceName ()
 Get the name of the device that should be initially selected for playback. More...
 
std::string getOutputFilePath ()
 Get the path of the output file specified at startup or during the file save routine. More...
 
Encoding getOutputFileEncoding ()
 Get the output encoding for the current global configuration. More...
 
double getDelayTimer ()
 Get the length of the delay timer in seconds. More...
 
double getRecordDuration ()
 Get the length of the record in seconds. More...
 
void setShowRecordDevices (bool)
 Setters. More...
 
void setNumberOfChannels (int)
 Set the number of channels for the current global device configuration. More...
 
void setSampleRate (int)
 Set the number of channels for the current global device configuration. More...
 
void setSampleSize (int)
 Set the sample size for the current global device configuration. More...
 
void setDefaultInputDeviceName (std::string)
 Set the name of the device that should be initially selected for record. More...
 
void setDefaultOutputDeviceName (std::string)
 Set the name of the device that should be initially selected for playback. More...
 
void setOutputFilePath (std::string)
 Set the path of the output file specified at startup or during the file save routine. More...
 
void setOutputFileEncoding (Encoding)
 Set the output encoding for the current global configuration. More...
 
void setDelayTimer (double)
 Set the length of the delay timer in seconds. More...
 
void setRecordDuration (double)
 Get the length of the record in seconds. More...
 
 ~HulaAudioSettings ()
 Destructor for HulaAudioSettings.
 

Static Public Member Functions

static HulaAudioSettingsgetInstance ()
 Retreive the singular instance of HulaSettings or construct a new one if none exists. More...
 

Protected Member Functions

 HulaAudioSettings ()
 Private constructor to enforce the singleton pattern. More...
 

Detailed Description

Class containing all settings pertinent to the audio module.

Constructor & Destructor Documentation

HulaAudioSettings::HulaAudioSettings ( )
protected

Private constructor to enforce the singleton pattern.

Initializes all settings to default values.

Member Function Documentation

std::string HulaAudioSettings::getDefaultInputDeviceName ( )

Get the name of the device that should be initially selected for record.

This defaults to the empty string if not set.

Returns
Name of input device to default to or the empty string if not set
std::string HulaAudioSettings::getDefaultOutputDeviceName ( )

Get the name of the device that should be initially selected for playback.

This defaults to the empty string if not set.

Returns
Name of the output device to default to or the empty string if not set
double HulaAudioSettings::getDelayTimer ( )

Get the length of the delay timer in seconds.

Returns
Length of the delay timer in seconds
HulaAudioSettings * HulaAudioSettings::getInstance ( )
static

Retreive the singular instance of HulaSettings or construct a new one if none exists.

Returns
Pointer to the HulaAudioSettings instance.
int HulaAudioSettings::getNumberOfChannels ( )

Get the number of channels for the current global device configuration.

This is the configuration that buffers and output files have been setup for. Changing it mid-anything may break stuff.

Returns
Number of channels that the application is currently configured for
Encoding HulaAudioSettings::getOutputFileEncoding ( )

Get the output encoding for the current global configuration.

This is the configuration that buffers and output files have been setup for. Changing it mid-anything may break stuff.

Returns
Encoding enum value indicating current encoding type
std::string HulaAudioSettings::getOutputFilePath ( )

Get the path of the output file specified at startup or during the file save routine.

This defaults to the empty string if not set.

Returns
Path to output file
double HulaAudioSettings::getRecordDuration ( )

Get the length of the record in seconds.

This will be -1 for infinite record.

Returns
Length of record in seconds
int HulaAudioSettings::getSampleRate ( )

Get the number of channels for the current global device configuration.

This is the configuration that buffers and output files have been setup for. Changing it mid-anything may break stuff.

Returns
Sample rate that the application is currentlyy configured for
int HulaAudioSettings::getSampleSize ( )

Get the sample size for the current global device configuration.

This is the configuration that buffers and output files have been setup for. Changing it mid-anything may break stuff.

Returns
Sample size that the application is currently configured for
bool HulaAudioSettings::getShowRecordDevices ( )

Getters.

Determine whether or not true record devices (i.e.

microphones) should be displayed in device lists.

Returns
Value of showRecordDevices
void HulaAudioSettings::setDefaultInputDeviceName ( std::string  val)

Set the name of the device that should be initially selected for record.

Parameters
valName of input device to default to or the empty string if not set
void HulaAudioSettings::setDefaultOutputDeviceName ( std::string  val)

Set the name of the device that should be initially selected for playback.

Parameters
valName of the output device to default to or the empty string if not set
void HulaAudioSettings::setDelayTimer ( double  val)

Set the length of the delay timer in seconds.

Parameters
valLength of the delay timer in seconds
void HulaAudioSettings::setNumberOfChannels ( int  val)

Set the number of channels for the current global device configuration.

This is the configuration that buffers and output files have been setup for. Changing it mid-anything may break stuff.

Parameters
valNumber of channels that the application is currently configured for
void HulaAudioSettings::setOutputFileEncoding ( Encoding  val)

Set the output encoding for the current global configuration.

This is the configuration that buffers and output files have been setup for. Changing it mid-anything may break stuff.

Parameters
valEncoding enum value indicating current encoding type
void HulaAudioSettings::setOutputFilePath ( std::string  val)

Set the path of the output file specified at startup or during the file save routine.

Parameters
valPath to output file
void HulaAudioSettings::setRecordDuration ( double  val)

Get the length of the record in seconds.

Use -1 for infinite record.

Parameters
valLength of record in seconds
void HulaAudioSettings::setSampleRate ( int  val)

Set the number of channels for the current global device configuration.

This is the configuration that buffers and output files have been setup for. Changing it mid-anything may break stuff.

Parameters
valSample rate that the application is currentlyy configured for
void HulaAudioSettings::setSampleSize ( int  val)

Set the sample size for the current global device configuration.

This is the configuration that buffers and output files have been setup for. Changing it mid-anything may break stuff.

Parameters
valSample size that the application is currently configured for
void HulaAudioSettings::setShowRecordDevices ( bool  val)

Setters.

Set whether or not true record devices (i.e.

microphones) should be displayed in the device lists.

Parameters
valValue of option.

The documentation for this class was generated from the following files: