Skip to content

Commit

Permalink
Merge branch 'yarp-3.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
robotology-bot committed Sep 18, 2023
2 parents e372b75 + 4670cb5 commit c1d30be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions doc/release/yarp_3_8/audioRecorderBase_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
audioRecorderBase_fix {#yarp-3.8}
---

### `lib_YARP_dev`

* Fixed segfault in audioRecorderDeviceBase
2 changes: 1 addition & 1 deletion src/libYARP_dev/src/yarp/dev/AudioRecorderDeviceBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ bool AudioRecorderDeviceBase::getSound(yarp::sig::Sound& sound, size_t min_numbe
if (samples_to_be_copied > max_number_of_samples) {
samples_to_be_copied = max_number_of_samples;
}
if (sound.getChannels() != this->m_audiorecorder_cfg.numChannels && sound.getSamples() != samples_to_be_copied)
if (sound.getChannels() != this->m_audiorecorder_cfg.numChannels || sound.getSamples() != samples_to_be_copied)
{
sound.resize(samples_to_be_copied, this->m_audiorecorder_cfg.numChannels);
}
Expand Down

0 comments on commit c1d30be

Please sign in to comment.