/// Returns the number of bytes-per-frame for a stream with the given format.
Returns the number of bytes-per-frame for a stream with the given format.
Returns the number of bytes - per - frame for a stream with the given format .
pub fn bytes_per_frame(stream_type: fidl_fuchsia_media::AudioStreamType) -> usize {
    match stream_type.sample_format {
        fidl_fuchsia_media::AudioSampleFormat::Unsigned8 => 1 * (stream_type.channels as usize),
        fidl_fuchsia_media::AudioSampleFormat::Signed16 => 2 * (stream_type.channels as usize),
        fidl_fuchsia_media::AudioSampleFormat::Signed24In32 => 4 * (stream_type.channels as usize),
        fidl_fuchsia_media::AudioSampleFormat::Float => 4 * (stream_type.channels as usize),
    }
}
pub fn bytes_per_frame ( stream_type : fidl_fuchsia_media :: AudioStreamType ) -> usize { match stream_type . sample_format { fidl_fuchsia_media :: AudioSampleFormat :: Unsigned8 => 1 * ( stream_type . channels as usize ) , fidl_fuchsia_media :: AudioSampleFormat :: Signed16 => 2 * ( stream_type . channels as usize ) , fidl_fuchsia_media :: AudioSampleFormat :: Signed24In32 => 4 * ( stream_type . channels as usize ) , fidl_fuchsia_media :: AudioSampleFormat :: Float => 4 * ( stream_type . channels as usize ) , } }
Returns the number of bytes-per-frame for a stream with the given format.
Returns the number of bytes - per - frame for a stream with the given format .
stream_type
fidl_fuchsia_media::AudioStreamType