Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed : replace slice_deque with slice_ring_buffer #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "minimp3"
version = "0.5.1"
version = "0.5.2"
authors = ["germän gômez <[email protected]>", "Erin Moon <[email protected]>"]
description = "Rust bindings for the minimp3 library."
keywords = ["mp3", "audio", "decoder", "mpeg", "media"]
Expand All @@ -10,7 +10,7 @@ repository = "https://github.com/germangb/minimp3-rs.git"
edition = "2018"

[dependencies]
slice-deque = "0.3.0"
slice-ring-buffer = "0.3.0"
minimp3-sys = { version = "0.3", path = "minimp3-sys" }
tokio = { version = "1.0", features = ["io-util"], optional = true }
thiserror = "1.0.23"
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
pub use error::Error;
pub use minimp3_sys as ffi;

use slice_deque::SliceDeque;
use slice_ring_buffer::SliceRingBuffer;
use std::{io, marker::Send, mem};

mod error;
Expand All @@ -27,7 +27,7 @@ const REFILL_TRIGGER: usize = MAX_SAMPLES_PER_FRAME * 8;
/// [`Frame`]: ./struct.Frame.html
pub struct Decoder<R> {
reader: R,
buffer: SliceDeque<u8>,
buffer: SliceRingBuffer<u8>,
buffer_refill: Box<[u8; MAX_SAMPLES_PER_FRAME * 5]>,
decoder: Box<ffi::mp3dec_t>,
}
Expand Down Expand Up @@ -61,7 +61,7 @@ impl<R> Decoder<R> {

Self {
reader,
buffer: SliceDeque::with_capacity(BUFFER_SIZE),
buffer: SliceRingBuffer::with_capacity(BUFFER_SIZE),
buffer_refill: Box::new([0; MAX_SAMPLES_PER_FRAME * 5]),
decoder: minidec,
}
Expand Down