Allows to interact with a Audio service.

#include <audioApi.h>

Public Member Functions

 Audio (std::string ip="127.0.0.1")
 
bool isAlive ()
 
boost::system::error_code monitorServiceAvailability_S (dpyAudio::ServiceAvailabilityObserver *observer)
 
boost::system::error_code monitorServiceAvailability_U (dpyAudio::ServiceAvailabilityObserver *observer)
 
void asyncCreateConnection (const dpyAudio::Connection &connection, dpyAudio::connection_handler_function handler)
 
void asyncRemoveConnection (const dpyAudio::Connection &connection, dpyAudio::connection_handler_function handler)
 
void asyncPlay (const dpyAudio::Port &port, std::string audioFilePath, std::list< dpyAudio::AudioConfig > configurations, dpyAudio::audio_task_handler_function handler)
 
void asyncRecord (const dpyAudio::Port &port, std::string outputAudioFile, std::list< dpyAudio::AudioConfig > configurations, dpyAudio::audio_task_handler_function handler)
 
void asyncStop (const int recordId, dpyAudio::stop_task_handler handler)
 
void getTaskStatus (int taskId, dpyAudio::audio_task_status_handler_function handler)
 
void asyncGetAllTaskInfo (dpyAudio::all_audio_task_info_handler_function handler)
 
void asyncSetAudioConfiguration (dpyAudio::AudioConfig configuration, dpyAudio::audio_set_configuration_handler_function handler)
 
void asyncGetAudioConfiguration (dpyAudio::audio_configuration_handler_function handler)
 
void portEvents_S (dpyAudio::port_event_handler_function handler)
 
void portEvents_U ()
 
void connectionListEvents_S (dpyAudio::connection_list_event_handler_function handler)
 
void connectionStatusEvents_S (dpyAudio::connection_status_event_handler_function handler)
 
void connectionListEvents_U ()
 
void connectionStatusEvents_U ()
 
void taskEvents_S (dpyAudio::task_event_handler_function handler)
 
void taskEvents_U ()
 
void portGpioEvents_S (dpyAudio::port_gpio_event_handler_function handler)
 
void portGpioEvents_U ()
 
void asyncSetVolume (const dpyAudio::Connection &connection, int volume, dpyAudio::set_connection_volume_handler_function handler)
 
void asyncSetGain (const dpyAudio::Connection &connection, int gain, dpyAudio::set_connection_gain_handler_function handler)
 
void asyncSetPortGpio (const dpyAudio::PortGpio &port_gpio, dpyAudio::result_handler_function handler)
 
void asyncUnsetPortGpio (const dpyAudio::Port &port, dpyAudio::result_handler_function handler)
 
void asyncGetPortGpio (dpyAudio::get_port_gpio_handler_function handler)
 
Port related methods

These methods allow to perform different Port operations.

void asyncGetPortList (dpyAudio::port_list_handler_function handler)
 
void asyncGetConnectionList (dpyAudio::connection_list_handler_function handler)
 
void asyncCreatePort (const dpyAudio::Port &port, dpyAudio::port_handler_function handler)
 
void asyncRemovePort (const dpyAudio::Port &port, dpyAudio::port_handler_function handler)