1use std::sync::atomic::{AtomicI32, Ordering};
9
10pub static GLOBAL_FRAME_COUNT: AtomicI32 = AtomicI32::new(0);
12
13pub fn get_next_frame_number() -> i32 {
15 GLOBAL_FRAME_COUNT.fetch_add(1, Ordering::SeqCst) + 1
16}
17
18pub fn get_current_frame_number() -> i32 {
20 GLOBAL_FRAME_COUNT.load(Ordering::SeqCst)
21}
22
23pub mod bitstream;
24pub mod encoder;
25pub mod error;
26pub mod huffman;
27pub mod mdct;
28pub mod mp3_encoder;
29pub mod quantization;
30pub mod reservoir;
31pub mod subband;
32pub mod tables;
33pub mod types;
34
35#[cfg(feature = "diagnostics")]
36pub mod diagnostics_data;
37
38
39
40pub use mp3_encoder::{
42 Mp3Encoder, Mp3EncoderConfig, StereoMode, encode_pcm_to_mp3,
43 SUPPORTED_SAMPLE_RATES, SUPPORTED_BITRATES
44};
45
46pub use encoder::{ShineConfig, ShineWave, ShineMpeg, shine_initialise, shine_encode_buffer_interleaved, shine_flush, shine_close, shine_set_config_mpeg_defaults};
48pub use error::{EncoderError, ConfigError, InputDataError, EncodingError, EncodingResult};
49pub use types::ShineGlobalConfig;