]> git.nihav.org Git - nihav.git/blame - nihav-llaudio/src/demuxers/mod.rs
zmbvenc: export changed palette
[nihav.git] / nihav-llaudio / src / demuxers / mod.rs
CommitLineData
87927c57
KS
1use nihav_core::demuxers::*;
2
3#[allow(unused_macros)]
4macro_rules! validate {
5 ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } };
6}
7
8#[cfg(feature="demuxer_ape")]
9mod ape;
10#[cfg(feature="demuxer_flac")]
11mod flac;
12#[cfg(feature="demuxer_tta")]
13mod tta;
14#[cfg(feature="demuxer_wavpack")]
15mod wavpack;
16
ac818eac 17const LL_AUDIO_DEMUXERS: &[&dyn DemuxerCreator] = &[
87927c57
KS
18#[cfg(feature="demuxer_ape")]
19 &ape::APEDemuxerCreator {},
20#[cfg(feature="demuxer_flac")]
21 &flac::FLACDemuxerCreator {},
22#[cfg(feature="demuxer_tta")]
23 &tta::TTADemuxerCreator {},
24#[cfg(feature="demuxer_wavpack")]
25 &wavpack::WavPackDemuxerCreator {},
26];
27
28/// Registers all available demuxers provided by this crate.
29pub fn llaudio_register_all_demuxers(rd: &mut RegisteredDemuxers) {
30 for demuxer in LL_AUDIO_DEMUXERS.iter() {
31 rd.add_demuxer(*demuxer);
32 }
33}