Documentation and exposure

Documentation in the fmt module has been improved.

ReadWaveData trait is now public.

The
This commit is contained in:
Jamie Hardt
2023-06-02 11:06:53 -07:00
parent c1d2b2c836
commit b8a428e757
2 changed files with 3 additions and 5 deletions

View File

@@ -379,6 +379,7 @@ impl WaveFmt {
}
pub trait ReadWavAudioData {
/// Read audio data from the receiver as interleaved [i32] samples.
fn read_i32_frames(
&mut self,
format: WaveFmt,
@@ -393,14 +394,11 @@ pub trait ReadWavAudioData {
impl<T> ReadWavAudioData for T
where
T: std::io::Read,
T: std::io::Read
{
/// Reade audio frames into an i32 vector
///
/// # Panics:
/// * If the format's [valid bits per sample](WaveFmt::valid_bits_per_sample) is
/// not compatible with the format's [bits per sample](WaveFmt::bits_per_sample).
///
fn read_i32_frames(
&mut self,
format: WaveFmt,

View File

@@ -50,7 +50,7 @@ pub use common_format::{
};
pub use cue::Cue;
pub use errors::Error;
pub use fmt::{ADMAudioID, ChannelDescriptor, ChannelMask, WaveFmt, WaveFmtExtended};
pub use fmt::{ADMAudioID, ChannelDescriptor, ChannelMask, WaveFmt, WaveFmtExtended, ReadWavAudioData};
pub use sample::{Sample, I24};
pub use wavereader::{AudioFrameReader, WaveReader};
pub use wavewriter::{AudioFrameWriter, WaveWriter};