googlearchive / android-audio-high-performance

We now recommend you use the Oboe libraries:
https://github.com/google/oboe
Apache License 2.0
720 stars 275 forks source link

echo crashes on closing #65

Closed ggfan closed 7 years ago

ggfan commented 7 years ago

I installed a fresh Android Studio and build the AAudio Samples.

I noticed that when "echo" exits that it crashes. It seems to call closeStream(recordingStream_) twice. Once in stop and then again in a destructor. It is deleted the first time and crashes the second.

It should set recordingStream_ = nullptr after closing. and then always check it before closing.

What component should I file a bug in. Or is this a known issue?

ggfan commented 7 years ago

closing it down as PR merged. The main factor is AAudioStream_close() taking care of the dataCallaback() nicely, saving lot of the application sync issues.