mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2025-12-31 17:00:44 +00:00
prettify code
This commit is contained in:
28
src/bext.rs
28
src/bext.rs
@@ -1,15 +1,13 @@
|
||||
|
||||
pub type LU = f32;
|
||||
pub type LUFS = f32;
|
||||
pub type Decibels = f32;
|
||||
|
||||
|
||||
/// Broadcast-WAV metadata record.
|
||||
///
|
||||
/// The `bext` record contains information about the original recording of the
|
||||
/// Wave file, including a longish (256 ASCII chars) description field,
|
||||
/// originator identification fields, creation calendar date and time, a
|
||||
/// sample-accurate recording time field, and a SMPTE UMID.
|
||||
/// The `bext` record contains information about the original recording of the
|
||||
/// Wave file, including a longish (256 ASCII chars) description field,
|
||||
/// originator identification fields, creation calendar date and time, a
|
||||
/// sample-accurate recording time field, and a SMPTE UMID.
|
||||
///
|
||||
/// For a Wave file to be a complaint "Broadcast-WAV" file, it must contain
|
||||
/// a `bext` metadata record.
|
||||
@@ -17,7 +15,7 @@ pub type Decibels = f32;
|
||||
/// ## Resources
|
||||
/// - [EBU Tech 3285](https://tech.ebu.ch/docs/tech/tech3285.pdf).
|
||||
/// - [EBU Tech R098](https://tech.ebu.ch/docs/r/r098.pdf) (1999) "Format for the <CodingHistory> field in Broadcast Wave Format files, BWF"
|
||||
/// - [EBU Tech R099](https://tech.ebu.ch/docs/r/r099.pdf) (October 2011) "‘Unique’ Source Identifier (USID) for use in the
|
||||
/// - [EBU Tech R099](https://tech.ebu.ch/docs/r/r099.pdf) (October 2011) "‘Unique’ Source Identifier (USID) for use in the
|
||||
/// <OriginatorReference> field of the Broadcast Wave Format"
|
||||
|
||||
// Note for me later:
|
||||
@@ -26,7 +24,6 @@ pub type Decibels = f32;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Bext {
|
||||
|
||||
/// 256 ASCII character field with free text.
|
||||
pub description: String,
|
||||
|
||||
@@ -47,23 +44,23 @@ pub struct Bext {
|
||||
pub time_reference: u64,
|
||||
|
||||
/// Bext chunk version.
|
||||
///
|
||||
/// Version 1 contains a UMID, version 2 contains a UMID and
|
||||
///
|
||||
/// Version 1 contains a UMID, version 2 contains a UMID and
|
||||
/// loudness metadata.
|
||||
pub version: u16,
|
||||
|
||||
/// SMPTE 330M UMID
|
||||
///
|
||||
///
|
||||
/// This field is `None` if the version is less than 1.
|
||||
pub umid: Option<[u8; 64]>,
|
||||
|
||||
/// Integrated loudness in LUFS.
|
||||
///
|
||||
///
|
||||
/// This field is `None` if the version is less than 2.
|
||||
pub loudness_value: Option<LUFS>,
|
||||
|
||||
/// Loudness range in LU.
|
||||
///
|
||||
///
|
||||
/// This field is `None` if the version is less than 2.
|
||||
pub loudness_range: Option<LU>,
|
||||
|
||||
@@ -78,11 +75,10 @@ pub struct Bext {
|
||||
pub max_momentary_loudness: Option<LUFS>,
|
||||
|
||||
/// Maximum short-term loudness in LUFS.
|
||||
///
|
||||
///
|
||||
/// This field is `None` if the version is less than 2.
|
||||
pub max_short_term_loudness: Option<LUFS>,
|
||||
// 180 bytes of nothing
|
||||
|
||||
/// Coding History.
|
||||
pub coding_history: String
|
||||
pub coding_history: String,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user