[][src]Function aaudio_sys::AAudioStreamBuilder_setFormat

pub unsafe extern "C" fn AAudioStreamBuilder_setFormat(
    builder: *mut AAudioStreamBuilder,
    format: i32
)

Request a sample data format, for example FORMAT_PCM_I16.

The default, if you do not call this function, is UNSPECIFIED. An optimal value will then be chosen when the stream is opened. After opening a stream with an unspecified value, the application must query for the actual value, which may vary by device.

If an exact value is specified then an opened stream will use that value. If a stream cannot be opened with the specified value then the open will fail.

Available since API level 26.

Arguments

  • builder - reference provided by AAudio_createStreamBuilder()
  • format - the sample data format.