fn sample_freq(&self) -> u32 {
        self.endpoint
            .get_configuration()
            .map(|caps| {
                for c in caps {
                    match c {
                        avdtp::ServiceCapability::MediaCodec {
                            media_type: avdtp::MediaType::Audio,
                            codec_type: avdtp::MediaCodecType::AUDIO_SBC,
                            codec_extra,
                        } => return Self::parse_sbc_sampling_frequency(&codec_extra),
                        avdtp::ServiceCapability::MediaCodec {
                            media_type: avdtp::MediaType::Audio,
                            codec_type: avdtp::MediaCodecType::AUDIO_AAC,
                            codec_extra,
                        } => return Self::parse_aac_sampling_frequency(&codec_extra),
                        _ => continue,
                    };
                }
                DEFAULT_SAMPLE_RATE
            })
            .unwrap_or(DEFAULT_SAMPLE_RATE)
    }
/// Get the currently configured sampling frequency for this stream or return a default value
/// if none is configured.
///
/// TODO: This should be removed once we have a structured way of accessing stream
/// capabilities.
Get the currently configured sampling frequency for this stream or return a default value
if none is configured.

This should be removed once we have a structured way of accessing stream
capabilities.
Get the currently configured sampling frequency for this stream or return a default value if none is configured . This should be removed once we have a structured way of accessing stream capabilities .
fn sample_freq(&self) -> u32 {
        self.endpoint
            .get_configuration()
            .map(|caps| {
                for c in caps {
                    match c {
                        avdtp::ServiceCapability::MediaCodec {
                            media_type: avdtp::MediaType::Audio,
                            codec_type: avdtp::MediaCodecType::AUDIO_SBC,
                            codec_extra,
                        } => return Self::parse_sbc_sampling_frequency(&codec_extra),
                        avdtp::ServiceCapability::MediaCodec {
                            media_type: avdtp::MediaType::Audio,
                            codec_type: avdtp::MediaCodecType::AUDIO_AAC,
                            codec_extra,
                        } => return Self::parse_aac_sampling_frequency(&codec_extra),
                        _ => continue,
                    };
                }
                DEFAULT_SAMPLE_RATE
            })
            .unwrap_or(DEFAULT_SAMPLE_RATE)
    }
fn sample_freq ( & self ) -> u32 { self . endpoint . get_configuration ( ) . map ( | caps | { for c in caps { match c { avdtp :: ServiceCapability :: MediaCodec { media_type : avdtp :: MediaType :: Audio , codec_type : avdtp :: MediaCodecType :: AUDIO_SBC , codec_extra , } => return Self :: parse_sbc_sampling_frequency ( & codec_extra ) , avdtp :: ServiceCapability :: MediaCodec { media_type : avdtp :: MediaType :: Audio , codec_type : avdtp :: MediaCodecType :: AUDIO_AAC , codec_extra , } => return Self :: parse_aac_sampling_frequency ( & codec_extra ) , _ => continue , } ; } DEFAULT_SAMPLE_RATE } ) . unwrap_or ( DEFAULT_SAMPLE_RATE ) }
Get the currently configured sampling frequency for this stream or return a default value
if none is configured.
Get the currently configured sampling frequency for this stream or return a default value if none is configured .
&self