Skip to content

Commit

Permalink
Portaudio device, previously marked as deprecated, has been definitel…
Browse files Browse the repository at this point in the history
…y removed from devices' CMakeLists.txt
  • Loading branch information
randaz81 committed Sep 17, 2024
1 parent e84e636 commit e39d03b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
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

0 comments on commit e39d03b

Please sign in to comment.