21#define CHECK_POINTER(xxx) {if (xxx==nullptr) {yCError(AUDIOGRAB_RPC, "Invalid interface"); return ReturnValue::return_code::return_value_error_not_ready;}}
25 std::lock_guard <std::mutex>
lg(m_mutex);
40 std::lock_guard <std::mutex>
lg(m_mutex);
55 std::lock_guard <std::mutex>
lg(m_mutex);
70 std::lock_guard <std::mutex>
lg(m_mutex);
85 std::lock_guard <std::mutex>
lg(m_mutex);
100 std::lock_guard <std::mutex>
lg(m_mutex);
103 if (m_igrab ==
nullptr)
106 ret.ret = ReturnValue::return_code::return_value_error_not_ready;
126 std::lock_guard <std::mutex>
lg(m_mutex);
129 if (m_igrab ==
nullptr)
132 ret.ret = ReturnValue::return_code::return_value_error_not_ready;
136 ret.ret = m_igrab->
getSound(
ret.sound, min_number_of_samples, max_number_of_samples, max_samples_timeout_s);
149 std::lock_guard <std::mutex>
lg(m_mutex);
152 if (m_igrab ==
nullptr)
155 ret.ret = ReturnValue::return_code::return_value_error_not_ready;
173 std::lock_guard <std::mutex>
lg(m_mutex);
176 if (m_igrab ==
nullptr)
179 ret.ret = ReturnValue::return_code::return_value_error_not_ready;
#define CHECK_POINTER(xxx)
virtual return_isRecording isRecording_RPC() override
virtual return_getSound getSound_RPC(const size_t min_number_of_samples, const size_t max_number_of_samples, const double max_samples_timeout_s) override
virtual yarp::dev::ReturnValue resetRecordingAudioBuffer_RPC() override
virtual yarp::dev::ReturnValue stopRecording_RPC() override
virtual yarp::dev::ReturnValue setSWGain_RPC(const double gain) override
virtual return_getRecordingAudioBufferMaxSize getRecordingAudioBufferMaxSize_RPC() override
virtual yarp::dev::ReturnValue setHWGain_RPC(const double gain) override
virtual yarp::dev::ReturnValue startRecording_RPC() override
virtual return_getRecordingAudioBufferCurrentSize getRecordingAudioBufferCurrentSize_RPC() override
virtual yarp::dev::ReturnValue getRecordingAudioBufferCurrentSize(yarp::sig::AudioBufferSize &size)=0
virtual yarp::dev::ReturnValue getSound(yarp::sig::Sound &sound, size_t min_number_of_samples, size_t max_number_of_samples, double max_samples_timeout_s)=0
Get a sound from a device.
virtual yarp::dev::ReturnValue stopRecording()=0
Stop the recording.
virtual yarp::dev::ReturnValue resetRecordingAudioBuffer()=0
virtual yarp::dev::ReturnValue isRecording(bool &recording_enabled)=0
Check if the recording has been enabled (e.g.
virtual yarp::dev::ReturnValue setHWGain(double gain)=0
Sets the hardware gain of the grabbing device (if supported by the hardware)
virtual yarp::dev::ReturnValue startRecording()=0
Start the recording.
virtual yarp::dev::ReturnValue setSWGain(double gain)=0
Sets a software gain for the grabbed audio.
virtual yarp::dev::ReturnValue getRecordingAudioBufferMaxSize(yarp::sig::AudioBufferSize &size)=0
A mini-server for performing network communication in the background.
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.