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

Extra class for managing the state of the application and all audio related processes. More...

#include <Transport.h>

Collaboration diagram for hula::Transport:
Collaboration graph
[legend]

Public Member Functions

 Transport ()
 Construct a new instance of the Transport class.
 
virtual ~Transport ()
 Delete the controller we created.
 
bool record (double delay, double duration)
 Start and handle the process of recording. More...
 
bool record ()
 Overload of record with no delay and infinite record time. More...
 
bool stop ()
 Enter the stopped state for playback or recording.
 
bool play ()
 Playback previously recorded audio.
 
bool pause ()
 Enter the paused state for playback or recording.
 
void discard ()
 Reset transport states and delete captured audio files from system temp folder.
 
ControllergetController () const
 Get the controller instance. More...
 
void exportFile (std::string targetDirectory)
 
bool hasExportPaths ()
 Checks if there are files in the export paths which means recording has happened and there are no files left to export. More...
 
TransportState getState () const
 Return the current state of the Transport object. More...
 
std::string stateToStr (const TransportState state) const
 Convert an enum of type TransportState to a presentable string. More...
 

Public Attributes

Controllercontroller
 

Protected Attributes

Recordrecorder
 

Detailed Description

Extra class for managing the state of the application and all audio related processes.

Member Function Documentation

◆ getController()

Controller * Transport::getController ( ) const

Get the controller instance.

Returns
pointer to controller

◆ getState()

TransportState Transport::getState ( ) const

Return the current state of the Transport object.

Returns
state Current transport state.

◆ hasExportPaths()

bool Transport::hasExportPaths ( )

Checks if there are files in the export paths which means recording has happened and there are no files left to export.

Returns
true is the user has recorded files

◆ record() [1/2]

bool Transport::record ( double  delay,
double  duration 
)

Start and handle the process of recording.

Parameters
delayTime, in seconds, to wait before starting record
durationTime, in seconds, to record for.
Returns
Successful start of recording

◆ record() [2/2]

bool Transport::record ( )

Overload of record with no delay and infinite record time.

Returns
Successful start of recording

◆ stateToStr()

std::string Transport::stateToStr ( const TransportState  state) const

Convert an enum of type TransportState to a presentable string.

Returns
stateString String containing appropriate state descriptor.

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