pub fn default_read_audio_file(input_audio_path: &str) -> Result<ProbeResult, AudioFileError> {
    log::info!(
        "Trying to open and probe audio file at {}",
        input_audio_path
    );

    let mut hint = Hint::new();
    let media_source = {
        let audio_input_path = Path::new(input_audio_path);
        let _ = try_set_audio_file_hint(&mut hint, audio_input_path);
        File::open(audio_input_path)?
    };
    let audio_file = MediaSourceStream::new(Box::new(media_source), Default::default());
    let format_opts: FormatOptions = Default::default();
    let metadata_opts: MetadataOptions = Default::default();
    let audio_file = get_probe().format(&hint, audio_file, &format_opts, &metadata_opts)?;
    Ok(audio_file)
}
/// Opens an audio file with default options & trying to guess the format
Opens an audio file with default options & trying to guess the format
Opens an audio file with default options & trying to guess the format
pub fn default_read_audio_file(input_audio_path: &str) -> Result<ProbeResult, AudioFileError> {
    log::info!(
        "Trying to open and probe audio file at {}",
        input_audio_path
    );
    let mut hint = Hint::new();
    let media_source = {
        let audio_input_path = Path::new(input_audio_path);
        let _ = try_set_audio_file_hint(&mut hint, audio_input_path);
        File::open(audio_input_path)?
    };
    let audio_file = MediaSourceStream::new(Box::new(media_source), Default::default());
    let format_opts: FormatOptions = Default::default();
    let metadata_opts: MetadataOptions = Default::default();
    let audio_file = get_probe().format(&hint, audio_file, &format_opts, &metadata_opts)?;
    Ok(audio_file)
}
pub fn default_read_audio_file ( input_audio_path : & str ) -> Result < ProbeResult , AudioFileError > { log :: info ! ( " " input_audio_path ) ; let mut hint = Hint :: new ( ) ; let media_source = { let audio_input_path = Path :: new ( input_audio_path ) ; let _ = try_set_audio_file_hint ( & mut hint , audio_input_path ) ; File :: open ( audio_input_path ) ? } ; let audio_file = MediaSourceStream :: new ( Box :: new ( media_source ) , Default :: default ( ) ) ; let format_opts : FormatOptions = Default :: default ( ) ; let metadata_opts : MetadataOptions = Default :: default ( ) ; let audio_file = get_probe ( ) . format ( & hint , audio_file , & format_opts , & metadata_opts ) ? ; Ok ( audio_file ) }
Opens an audio file with default options & trying to guess the format
Opens an audio file with default options & trying to guess the format
input_audio_path
&str
input_audio_path
&str