[][src]Function aaudio_sys::AAudioStream_release

pub unsafe extern "C" fn AAudioStream_release(stream: *mut AAudioStream) -> i32

Free the audio resources associated with a stream created by AAudioStreamBuilder_openStream(). AAudioStream_close() should be called at some point after calling this function.

Returns 0 for OK or a negative error.

After this call, the stream will be in Closing state

This function is useful if you want to release the audio resources immediately, but still allow queries to the stream to occur from other threads. This often happens if you are monitoring stream progress from a UI thread.

Available since API level 30.

Arguments

  • stream - reference provided by AAudioStreamBuilder_openStream()