/// Synchronize the provided reader to the end of the frame header, and return the frame header as
/// as `u32`.
Synchronize the provided reader to the end of the frame header, and return the frame header as
as `u32`.
Synchronize the provided reader to the end of the frame header and return the frame header as as ` u32 ` .
pub fn sync_frame<B: ByteStream>(reader: &mut B) -> Result<u32> {
    let mut sync = 0u32;
    // Synchronize stream to the next frame using the sync word. The MP3 frame header always starts
    // at a byte boundary with 0xffe (11 consecutive 1 bits.) if supporting up to MPEG version 2.5.
    while (sync & 0xffe0_0000) != 0xffe0_0000 {
        sync = (sync << 8) | u32::from(reader.read_u8()?);
    }
    Ok(sync)
}
pub fn sync_frame < B : ByteStream > ( reader : & mut B ) -> Result < u32 > { let mut sync = 0u32 ; // Synchronize stream to the next frame using the sync word. The MP3 frame header always starts // at a byte boundary with 0xffe (11 consecutive 1 bits.) if supporting up to MPEG version 2.5. while ( sync & 0xffe0_0000 ) != 0xffe0_0000 { sync = ( sync << 8 ) | u32 :: from ( reader . read_u8 ( ) ? ) ; } Ok ( sync ) }
Synchronize the provided reader to the end of the frame header, and return the frame header as
as `u32`.
Synchronize the provided reader to the end of the frame header and return the frame header as as ` u32 ` .
reader
&mut B