-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fixed the AudioDecoder class #81
Conversation
Codecov Report
@@ Coverage Diff @@
## ign-common3 #81 +/- ##
===============================================
+ Coverage 73.72% 73.94% +0.21%
===============================================
Files 68 69 +1
Lines 9287 9390 +103
===============================================
+ Hits 6847 6943 +96
- Misses 2440 2447 +7
Continue to review full report at Codecov.
|
Rebase on ign-common3 and signoff for DCO please. |
9881f02
to
a578b49
Compare
|
changes look good to me. Just need to rebase for abi-checker build to pass |
Signed-off-by: Ashton Larkin <ashton@openrobotics.org>
Signed-off-by: Ashton Larkin <ashton@openrobotics.org>
a578b49
to
0038102
Compare
@scpeters and @iche033 I'm trying to help Ashton understand the output of the ABI report here: Based on the changes in the PR, I wouldn't anticipate any API or ABI problems, because nothing along those lines has changed. As far as I can tell the checker believes that essential the same symbol (mod template specialization) is being removed and added. What is interesting is that this If I look at my local copies of
|
that looks like a false positive, which I've seen before: gazebo-tooling/release-tools#120 no code in that header file is changed, so I would just ignore it. an administrator should override the blocked merge in this case |
oh I didn't know about the abi-checker bug. Not sure if it's an issue with the abi-checker when the base version contains only the header files and the .cc files were not being built. |
Thanks for following up on this, @scpeters and @mjcarroll. Is everything okay then, or are there any other changes I need to make? |
* fixed existing AudioDecoder unit tests Signed-off-by: Ashton Larkin <ashton@openrobotics.org> * handled possible seg fault by using AudioDecoder without calling SetFile Signed-off-by: Ashton Larkin <ashton@openrobotics.org>
* fixed existing AudioDecoder unit tests Signed-off-by: Ashton Larkin <ashton@openrobotics.org> * handled possible seg fault by using AudioDecoder without calling SetFile Signed-off-by: Ashton Larkin <ashton@openrobotics.org> Signed-off-by: Michael Carroll <michael@openrobotics.org>
I've updated the unit tests for the
AudioDecoder
class so that they compile and pass.I also added a check in
AudioDecoder::SampleRate
to ensure that a null pointer is not de-referenced in case users callAudioDecoder::SampleRate
before callingAudioDecoder::SetFile
.One question: In the case where users call
AudioDecoder::SampleRate
before callingAudioDecoder::SetFile
, what shouldAudioDecoder::SampleRate
return? I madeAudioDecoder::SampleRate
return-1
in this case, because I figured that a negative sample rate implies that the decoder's current state is invalid. I anyone thinks there is a better value to return (for example,0
), let me know, and I will updateAudioDecoder::SampleRate
accordingly.