Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed deprecated device Portaudio #3140

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/release/master.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ New Features

* Deprecated device

#### portaudio

* Portaudio device, previously marked as deprecated, has been definitely removed from devices' CMakeLists.txt

#### FakePythonSpeechTranscription

* Added new device `FakePythonSpeechTranscription`. The device is also an example which demonstrates the encapsulation of python code inside a c++ device implementing a Yarp interface.
Expand Down
2 changes: 0 additions & 2 deletions src/devices/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ yarp_begin_plugin_library(yarpmod
add_subdirectory(JoypadControlNetUtils)
add_subdirectory(frameGrabberCropper)

add_subdirectory(portaudio) # DEPRECATED Since YARP 3.2

# Test devices
add_subdirectory(test_segfault)
add_subdirectory(test_nop)
Expand Down
2 changes: 2 additions & 0 deletions src/devices/portaudio/DEPRECATION_NOTICE.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The code contained in this folder has been deprecated and it is no more maintained.
It will be removed in the near future.
2 changes: 1 addition & 1 deletion src/devices/portaudio/PortAudioBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <string>
#include <portaudio.h>
#include <yarp/dev/AudioBufferSize.h>
#include <yarp/sig/AudioBufferSize.h>
#include <yarp/dev/CircularAudioBuffer.h>
#include <cstdio>

Expand Down
9 changes: 5 additions & 4 deletions src/devices/portaudio/PortAudioDeviceDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

using namespace yarp::os;
using namespace yarp::dev;
using namespace yarp::sig;

#define SLEEP_TIME 0.005f

Expand Down Expand Up @@ -618,13 +619,13 @@ bool PortAudioDeviceDriver::appendSound(const yarp::sig::Sound& sound)
return true;
}

bool PortAudioDeviceDriver::getPlaybackAudioBufferCurrentSize(yarp::dev::AudioBufferSize& size)
bool PortAudioDeviceDriver::getPlaybackAudioBufferCurrentSize(yarp::sig::AudioBufferSize& size)
{
size = this->dataBuffers.playData->size();
return true;
}

bool PortAudioDeviceDriver::getPlaybackAudioBufferMaxSize(yarp::dev::AudioBufferSize& size)
bool PortAudioDeviceDriver::getPlaybackAudioBufferMaxSize(yarp::sig::AudioBufferSize& size)
{
size = this->dataBuffers.playData->getMaxSize();
return true;
Expand All @@ -636,13 +637,13 @@ bool PortAudioDeviceDriver::resetPlaybackAudioBuffer()
return true;
}

bool PortAudioDeviceDriver::getRecordingAudioBufferCurrentSize(yarp::dev::AudioBufferSize& size)
bool PortAudioDeviceDriver::getRecordingAudioBufferCurrentSize(yarp::sig::AudioBufferSize& size)
{
size = this->dataBuffers.recData->size();
return true;
}

bool PortAudioDeviceDriver::getRecordingAudioBufferMaxSize(yarp::dev::AudioBufferSize& size)
bool PortAudioDeviceDriver::getRecordingAudioBufferMaxSize(yarp::sig::AudioBufferSize& size)
{
size = this->dataBuffers.recData->getMaxSize();
return true;
Expand Down
8 changes: 4 additions & 4 deletions src/devices/portaudio/PortAudioDeviceDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ class PortAudioDeviceDriver :
bool immediateSound(const yarp::sig::Sound& sound);
bool appendSound(const yarp::sig::Sound& sound);

bool getPlaybackAudioBufferMaxSize(yarp::dev::AudioBufferSize& size) override;
bool getPlaybackAudioBufferCurrentSize(yarp::dev::AudioBufferSize& size) override;
bool getPlaybackAudioBufferMaxSize(yarp::sig::AudioBufferSize& size) override;
bool getPlaybackAudioBufferCurrentSize(yarp::sig::AudioBufferSize& size) override;
bool resetPlaybackAudioBuffer() override;

bool getRecordingAudioBufferMaxSize(yarp::dev::AudioBufferSize& size) override;
bool getRecordingAudioBufferCurrentSize(yarp::dev::AudioBufferSize& size) override;
bool getRecordingAudioBufferMaxSize(yarp::sig::AudioBufferSize& size) override;
bool getRecordingAudioBufferCurrentSize(yarp::sig::AudioBufferSize& size) override;
bool resetRecordingAudioBuffer() override;

bool setHWGain(double gain) override;
Expand Down
Loading