google / oboe

Oboe is a C++ library that makes it easy to build high-performance audio apps on Android.
Apache License 2.0
3.71k stars 569 forks source link

[RhythmGame - game-codelab branch] use of undeclared identifier 'assert' error #1207

Open dturner opened 3 years ago

dturner commented 3 years ago

Getting the following error when trying to build the RhythmGame sample on the game-codelab branch:

/Users/donturner/Code/workspace-android/oboe/src/flowgraph/resampler/PolyphaseResampler.cpp:26:5: error: use of undeclared identifier 'assert'
serhii-k commented 3 years ago

I'm having the same issue on my project. I guess after upgrading NDK.

.../workspace/oboe-1.4.3/src/flowgraph/resampler/PolyphaseResamplerMono.cpp:25:5: error: use of undeclared identifier 'assert'
.../workspace/oboe-1.4.3/src/flowgraph/resampler/PolyphaseResampler.cpp:26:5: error: use of undeclared identifier 'assert'
.../workspace/oboe-1.4.3/src/flowgraph/resampler/SincResamplerStereo.cpp:27:5: error: use of undeclared identifier 'assert'
.../workspace/oboe-1.4.3/src/flowgraph/resampler/SincResampler.cpp:25:5: error: use of undeclared identifier 'assert'
.../workspace/oboe-1.4.3/src/flowgraph/resampler/PolyphaseResamplerStereo.cpp:25:5: error: use of undeclared identifier 'assert'

Had to comment out the assert calls for code to compile.

IHNEL commented 11 months ago

You can include the cassert like this to resolve:

include "cassert"

robertwu1 commented 11 months ago

Fixed in https://github.com/google/oboe/commit/395f3d6ac25c2b069d53451b89dff4aa96d26eb8

robertwu1 commented 11 months ago

@philburk@google.com do you know how to cherry-pick this one change to the game-codelab-final branch? It's already in the game-codelab branch.