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
//! Dependency-free error type for the MP3 codec.
//!
//! The [`Error::Again`] / [`Error::Eof`] pair mirrors FFmpeg's
//! `EAGAIN`/`EOF` codec-drain protocol: a pull call ([`crate::Mp3Decoder::next_frame`],
//! [`crate::Mp3Encoder::next_packet`]) returns `Err(Again)` when more input is
//! needed before output can be produced, and `Err(Eof)` once the stream has been
//! flushed ([`crate::Mp3Decoder::flush`] / [`crate::Mp3Encoder::finish`]) and
//! fully drained. Neither is a failure — they drive the push/pull loop.
use fmt;
/// Crate-wide result alias.
pub type Result<T> = Result;
/// All the ways MP3 encode/decode can fail (or signal drain-loop state).