1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//! # shravan
//!
//! **shravan** (Sanskrit: hearing / perception) — Audio codecs for the AGNOS ecosystem.
//!
//! Provides encode/decode for WAV, FLAC, AIFF, Ogg/Opus, AAC, ALAC, and MP3,
//! plus PCM sample format conversion, sinc resampling, and metadata tag reading.
//!
//! ## Feature flags
//!
//! | Feature | Default | Description |
//! |-------------|---------|------------------------------------------|
//! | `std` | yes | Standard library support |
//! | `wav` | yes | WAV encode/decode |
//! | `flac` | yes | FLAC encode/decode |
//! | `pcm` | yes | PCM format conversions |
//! | `resample` | no | Sinc resampler |
//! | `tag` | no | ID3v2 / Vorbis Comment tag reading |
//! | `ogg` | no | Ogg container parsing/muxing |
//! | `aiff` | no | AIFF/AIFF-C encode/decode |
//! | `mp3` | no | MP3 frame parsing (header only) |
//! | `opus` | no | Opus header parsing + CELT-mode encode |
//! | `aac` | no | AAC-LC decode (ADTS) + encode (requires `std`) |
//! | `alac` | no | Apple Lossless decode (raw frames) |
//! | `simd` | no | SIMD-accelerated PCM conversion |
//! | `dither` | no | Dithering for bit-depth reduction |
//! | `streaming` | no | Streaming decoders (requires `std`) |
//! | `logging` | no | tracing instrumentation |
//!
//! ## Quick start
//!
//! ```rust,ignore
//! use shravan::format::detect_format;
//! use shravan::codec::open;
//!
//! // Auto-detect and decode (requires wav + pcm features)
//! let wav_bytes = shravan::wav::encode(
//! &[0.0f32; 100], 44100, 1, shravan::pcm::PcmFormat::I16,
//! ).unwrap();
//! let (info, samples) = open(&wav_bytes).unwrap();
//! assert_eq!(info.sample_rate, 44100);
//! ```
extern crate alloc;
pub
// Re-exports for convenience.
pub use ;
pub use ;