Struct claxon::FlacReaderOptions [−][src]
Controls what metadata FlacReader
reads when constructed.
The FLAC format contains a number of metadata blocks before the start of
audio data. Reading these is wasteful if the data is never used. The
FlacReaderOptions
indicate which blocks to look for. As soon as all
desired blocks have been read, FlacReader::new_ext()
returns without
reading remaining metadata blocks.
A few use cases:
- To read only the streaminfo, as quickly as possible, set
metadata_only
to true andread_vorbis_comment
to false. The resulting reader cannot be used to read audio data. - To read only the streaminfo and tags, set
metadata_only
andread_vorbis_comment
both to true. The resulting reader cannot be used to read audio data.
Fields
metadata_only: bool
When true, return a reader as soon as all desired metadata has been read.
If this is set, the FlacReader
will not be able to read audio samples.
When reading audio is not desired anyway, enabling metadata_only
can
save a lot of expensive reads.
Defaults to false.
read_vorbis_comment: bool
When true, read metadata blocks at least until a Vorbis comment block is found.
When false, the FlacReader
will be constructed without reading a
Vorbis comment block, even if the stream contains one. Consequently,
FlacReader::tags()
and other tag-related methods will not return tag
data.
Defaults to true.
Trait Implementations
impl Copy for FlacReaderOptions
[src]
impl Copy for FlacReaderOptions
impl Clone for FlacReaderOptions
[src]
impl Clone for FlacReaderOptions
fn clone(&self) -> FlacReaderOptions
[src]
fn clone(&self) -> FlacReaderOptions
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for FlacReaderOptions
[src]
impl Debug for FlacReaderOptions
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for FlacReaderOptions
[src]
impl Eq for FlacReaderOptions
impl PartialEq for FlacReaderOptions
[src]
impl PartialEq for FlacReaderOptions
fn eq(&self, other: &FlacReaderOptions) -> bool
[src]
fn eq(&self, other: &FlacReaderOptions) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &FlacReaderOptions) -> bool
[src]
fn ne(&self, other: &FlacReaderOptions) -> bool
This method tests for !=
.
impl Default for FlacReaderOptions
[src]
impl Default for FlacReaderOptions
fn default() -> FlacReaderOptions
[src]
fn default() -> FlacReaderOptions
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for FlacReaderOptions
impl Send for FlacReaderOptions
impl Sync for FlacReaderOptions
impl Sync for FlacReaderOptions