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.
 
ControllergetController () const
 Get the controller instance. More...
 
void exportFile (std::string targetDirectory)
 
TransportState getState () const
 Discard any recorded audio and reset the state. 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

Controller * Transport::getController ( ) const

Get the controller instance.

Returns
pointer to controller
TransportState Transport::getState ( ) const

Discard any recorded audio and reset the state.

Returns
bool Success of command Return the current state of the Transport object.
state Current transport state.
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
bool Transport::record ( )

Overload of record with no delay and infinite record time.

Returns
Successful start of recording
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: