mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
89577d1fc1
* Improve error handling * Harmonize `Seek`: Make the decoders and player use the same math for converting between samples and milliseconds * Reduce duplicate calls: Make decoder seek in PCM, not ms * Simplify decoder errors with `thiserror`
20 lines
511 B
Rust
20 lines
511 B
Rust
#[macro_use]
|
|
extern crate log;
|
|
|
|
use librespot_audio as audio;
|
|
use librespot_core as core;
|
|
use librespot_metadata as metadata;
|
|
|
|
pub mod audio_backend;
|
|
pub mod config;
|
|
pub mod convert;
|
|
pub mod decoder;
|
|
pub mod dither;
|
|
pub mod mixer;
|
|
pub mod player;
|
|
|
|
pub const SAMPLE_RATE: u32 = 44100;
|
|
pub const NUM_CHANNELS: u8 = 2;
|
|
pub const SAMPLES_PER_SECOND: u32 = SAMPLE_RATE as u32 * NUM_CHANNELS as u32;
|
|
pub const PAGES_PER_MS: f64 = SAMPLE_RATE as f64 / 1000.0;
|
|
pub const MS_PER_PAGE: f64 = 1000.0 / SAMPLE_RATE as f64;
|