From ad0736dcc6e8401f36cb7c117afb430d170ee6d1 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Thu, 10 Dec 2020 18:46:53 -0800 Subject: [PATCH] Documentation --- src/fmt.rs | 20 ++++++++------------ src/lib.rs | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/fmt.rs b/src/fmt.rs index 085ca9b..146a3ea 100644 --- a/src/fmt.rs +++ b/src/fmt.rs @@ -3,20 +3,20 @@ use super::common_format::CommonFormat; #[allow(dead_code)] -/// ADM Audio ID record +/// ADM Audio ID record. /// /// This structure relates a channel in the wave file to either a common ADM /// channel definition or further definition in the WAV file's ADM metadata /// chunk. /// /// An individual channel in a WAV file can have multiple Audio IDs in an ADM -/// AudioProgramme. +/// `AudioProgramme`. /// /// See BS.2088-1 ยง 8, also BS.2094, also blahblahblah... pub struct ADMAudioID { - track_uid: [char; 12], - channel_format_ref: [char; 14], - pack_ref: [char; 11] + pub track_uid: [char; 12], + pub channel_format_ref: [char; 14], + pub pack_ref: [char; 11] } /// Describes a single channel in a WAV file. @@ -35,13 +35,9 @@ pub struct ChannelDescriptor { } - -/* -https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/subformat-guids-for-compressed-audio-formats - -These are from http://dream.cs.bath.ac.uk/researchdev/wave-ex/mulchaud.rtf -*/ - +/// A bitmask indicating which channels are present in +/// the file. +/// #[derive(Debug, Clone, Copy, PartialEq)] pub enum ChannelMask { DirectOut = 0x0, diff --git a/src/lib.rs b/src/lib.rs index b6942bb..33fce9b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -128,7 +128,7 @@ pub use errors::Error; pub use wavereader::WaveReader; pub use wavewriter::WaveWriter; pub use bext::Bext; -pub use fmt::{WaveFmt, WaveFmtExtended, ChannelDescriptor, ChannelMask}; +pub use fmt::{WaveFmt, WaveFmtExtended, ChannelDescriptor, ChannelMask, ADMAudioID}; pub use common_format::CommonFormat; pub use audio_frame_reader::AudioFrameReader; pub use cue::Cue; \ No newline at end of file