minimp3 rust bindings + wrapper

Overview

minimp3 Rust bindings

Cargo package Cargo package Build Status

Usage example

# Cargo.toml

[dependencies]
minimp3 = "0.5"
use minimp3::{Decoder, Frame, Error};

use std::fs::File;

fn main() {
    let mut decoder = Decoder::new(File::open("audio_file.mp3").unwrap());

    loop {
        match decoder.next_frame() {
            Ok(Frame { data, sample_rate, channels, .. }) => {
                println!("Decoded {} samples", data.len() / channels)
            },
            Err(Error::Eof) => break,
            Err(e) => panic!("{:?}", e),
        }
    }
}

Async I/O

The decoder can be used with Tokio via the async_tokio feature flag.

# Cargo.toml

[dependencies]
minimp3 = { version = "0.4", features = ["async_tokio"] }

# tokio runtime
tokio = {version = "0.2", features = ["full"] }
use minimp3::{Decoder, Frame, Error};

use tokio::fs::File;

#[tokio::main]
async fn main() {
    let file = File::open("minimp3-sys/minimp3/vectors/M2L3_bitrate_24_all.bit").await.unwrap();
    let mut decoder = Decoder::new(file);

    loop {
        match decoder.next_frame_future().await {
            Ok(Frame {
                   data,
                   sample_rate,
                   channels,
                   ..
               }) => println!("Decoded {} samples", data.len() / channels),
            Err(Error::Eof) => break,
            Err(e) => panic!("{:?}", e),
        }
    }
}
Comments
  • Playback clipping.

    Playback clipping.

    Making this issue here at the request of @germangb within the issue found here: https://github.com/tomaka/rodio/issues/212

    MP3 playback of the simple rodio MP3 example seems to be clipping something like a second of audio from the end of the audio stream. This is particularly apparent on short audio clips, with a 1 second duration MP3 not outputting any sound and a 2 second duration MP3 cutting out midway through playback.

    This is on Windows 10 x64 compiling using Rust 1.30.1 with the MSVC toolchain.

    bug 
    opened by GlenCFL 5
  • 'minimp3.h': No such file or directory

    'minimp3.h': No such file or directory

    P:\temp\minimp3-rs>cargo build
       Compiling minimp3-sys v0.3.0 (file:///P:/temp/minimp3-rs/minimp3-sys)
    error: failed to run custom build command for `minimp3-sys v0.3.0 (file:///P:/temp/minimp3-rs/minimp3-sys)`
    process didn't exit successfully: `P:\temp\minimp3-rs\target\debug\build\minimp3-sys-2660a10876616d70\build-script-build` (exit code: 101)
    --- stdout
    TARGET = Some("i686-pc-windows-msvc")
    OPT_LEVEL = Some("0")
    TARGET = Some("i686-pc-windows-msvc")
    HOST = Some("i686-pc-windows-msvc")
    TARGET = Some("i686-pc-windows-msvc")
    TARGET = Some("i686-pc-windows-msvc")
    HOST = Some("i686-pc-windows-msvc")
    CC_i686-pc-windows-msvc = None
    CC_i686_pc_windows_msvc = None
    HOST_CC = None
    CC = None
    TARGET = Some("i686-pc-windows-msvc")
    HOST = Some("i686-pc-windows-msvc")
    CFLAGS_i686-pc-windows-msvc = None
    CFLAGS_i686_pc_windows_msvc = None
    HOST_CFLAGS = None
    CFLAGS = None
    DEBUG = Some("true")
    running: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX64\\x86\\cl.exe" "/nologo" "/MD" "/Z7" "/I" "minimp3/" "/W4" "/DMINIMP3_IMPLEMENTATION" "/FoP:\
    \temp\\minimp3-rs\\target\\debug\\build\\minimp3-sys-d12ec57c6b5d8722\\out\\minimp3.o" "/c" "minimp3.c"
    minimp3.c
    minimp3.c(1): fatal error C1083: Cannot open include file: 'minimp3.h': No such file or directory
    exit code: 2
    
    --- stderr
    thread 'main' panicked at '
    
    Internal error occurred: Command "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX64\\x86\\cl.exe" "/nologo" "/MD" "/Z7" "/I" "minimp3/" "/W4" "/DMINIMP3
    _IMPLEMENTATION" "/FoP:\\temp\\minimp3-rs\\target\\debug\\build\\minimp3-sys-d12ec57c6b5d8722\\out\\minimp3.o" "/c" "minimp3.c" with args "cl.exe" did not execute successfully (status code exit code: 2).
    
    ', C:\Users\vkudasov\.cargo\registry\src\github.com-1ecc6299db9ec823\cc-1.0.17\src\lib.rs:2180:5
    note: Run with `RUST_BACKTRACE=1` for a backtrace.
    
    opened by kuviman 4
  • Build fails without clang

    Build fails without clang

    Hi, I try to compile the rodio crate with mp3 feature enabled which uses minimp3 crate, but building fails with this error

    error: failed to run custom build command for `minimp3-sys v0.2.0`
    process didn't exit successfully: `D:\Programms\Rust\melos\target\debug\build\minimp3-sys-ca589f4130bfb632\build-script-build` (exit code: 101)
    --- stderr
    thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any of [\'clang.dll\', \'libclang.dll\'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (skipped: [])"', libcore\result.rs:945:5
    stack backtrace:
       0:     0x7ff65253733a - std::sys::windows::backtrace::unwind_backtrace
                                   at C:\projects\rust\src\libstd\sys\windows\backtrace\mod.rs:65
       1:     0x7ff6525455af - std::sys_common::backtrace::_print
                                   at C:\projects\rust\src\libstd\sys_common\backtrace.rs:71
       2:     0x7ff6525455af - std::sys_common::backtrace::print
                                   at C:\projects\rust\src\libstd\sys_common\backtrace.rs:59
       3:     0x7ff65253890e - std::panicking::default_hook::{{closure}}
                                   at C:\projects\rust\src\libstd\panicking.rs:207
       4:     0x7ff6525385ba - std::panicking::default_hook
                                   at C:\projects\rust\src\libstd\panicking.rs:223
       5:     0x7ff652538ece - std::panicking::rust_panic_with_hook
                                   at C:\projects\rust\src\libstd\panicking.rs:402
       6:     0x7ff652538c7f - std::panicking::begin_panic_fmt
                                   at C:\projects\rust\src\libstd\panicking.rs:349
       7:     0x7ff652538ba1 - std::panicking::rust_begin_panic
                                   at C:\projects\rust\src\libstd\panicking.rs:325
       8:     0x7ff65254b5bc - core::panicking::panic_fmt
                                   at C:\projects\rust\src\libcore\panicking.rs:72
       9:     0x7ff6520a1f96 - core::result::unwrap_failed<alloc::string::String>
                                   at C:\projects\rust\src\libcore\macros.rs:26
      10:     0x7ff65209bac3 - core::result::Result<(), alloc::string::String>::expect<(),alloc::string::String>
                                   at C:\projects\rust\src\libcore\result.rs:809
      11:     0x7ff652053c4d - core::ops::function::FnOnce::call_once<fn() -> alloc::arc::Arc<clang_sys::SharedLibrary>,()>
                                   at C:\projects\rust\src\libcore\ops\function.rs:223
      12:     0x7ff65209658a - lazy_static::lazy::{{impl}}::get::{{closure}}<alloc::arc::Arc<clang_sys::SharedLibrary>,fn() -> alloc::arc::Arc<clang_sys::SharedLibrary>>
                                   at C:\Users\Aliaksandr\.cargo\registry\src\github.com-1ecc6299db9ec823\lazy_static-1.0.1\src\lazy.rs:24
      13:     0x7ff65201303a - std::sync::once::{{impl}}::call_once::{{closure}}<closure>
                                   at C:\projects\rust\src\libstd\sync\once.rs:227
      14:     0x7ff652534a51 - std::sync::once::Once::call_inner
                                   at C:\projects\rust\src\libstd\sync\once.rs:340
      15:     0x7ff652012de2 - std::sync::once::Once::call_once<closure>
                                   at C:\projects\rust\src\libstd\sync\once.rs:227
      16:     0x7ff651fb3e79 - lazy_static::lazy::Lazy<alloc::arc::Arc<clang_sys::SharedLibrary>>::get
                                   at C:\Users\Aliaksandr\.cargo\registry\src\github.com-1ecc6299db9ec823\lazy_static-1.0.1\src\lazy.rs:23
      17:     0x7ff651fb3e79 - bindgen::ensure_libclang_is_loaded::{{impl}}::deref::__stability
                                   at C:\Users\Aliaksandr\.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.37.0\<__lazy_static_internal macros>:13
      18:     0x7ff651fb3e79 - bindgen::ensure_libclang_is_loaded::{{impl}}::deref
                                   at C:\Users\Aliaksandr\.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.37.0\<__lazy_static_internal macros>:14
      19:     0x7ff651fad88b - bindgen::ensure_libclang_is_loaded
                                   at C:\Users\Aliaksandr\.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.37.0\src\lib.rs:1528
      20:     0x7ff651fad976 - bindgen::Bindings::generate
                                   at C:\Users\Aliaksandr\.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.37.0\src\lib.rs:1543
      21:     0x7ff651fac5b3 - bindgen::Builder::generate
                                   at C:\Users\Aliaksandr\.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.37.0\src\lib.rs:1102
      22:     0x7ff651f12787 - build_script_build::main
                                   at C:\Users\Aliaksandr\.cargo\registry\src\github.com-1ecc6299db9ec823\minimp3-sys-0.2.0\build.rs:10
      23:     0x7ff651f11783 - std::rt::lang_start::{{closure}}<()>
                                   at C:\projects\rust\src\libstd\rt.rs:74
      24:     0x7ff652538adc - std::rt::lang_start_internal::{{closure}}
                                   at C:\projects\rust\src\libstd\rt.rs:59
      25:     0x7ff652538adc - std::panicking::try::do_call<closure,i32>
                                   at C:\projects\rust\src\libstd\panicking.rs:306
      26:     0x7ff6525483f1 - panic_unwind::__rust_maybe_catch_panic
                                   at C:\projects\rust\src\libpanic_unwind\lib.rs:102
      27:     0x7ff652536fa2 - std::panicking::try
                                   at C:\projects\rust\src\libstd\panicking.rs:285
      28:     0x7ff652536fa2 - std::panic::catch_unwind
                                   at C:\projects\rust\src\libstd\panic.rs:361
      29:     0x7ff652536fa2 - std::rt::lang_start_internal
                                   at C:\projects\rust\src\libstd\rt.rs:58
      30:     0x7ff651f11753 - std::rt::lang_start<()>
                                   at C:\projects\rust\src\libstd\rt.rs:74
      31:     0x7ff651f12a86 - main
      32:     0x7ff65255898b - invoke_main
                                   at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:78
      33:     0x7ff65255898b - __scrt_common_main_seh
                                   at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283
      34:     0x7fffa6061fe3 - BaseThreadInitThunk
      35:     0x7fffa619f060 - RtlUserThreadStart
    

    Is it really nessesary to compile c++ lib with clang not with the default compiler? In my case, with Visual Studio 2017 Build tools

    PS D:\Programms\Rust\melos> cargo -vV
    cargo 1.26.0 (0e7c5a931 2018-04-06)
    release: 1.26.0
    commit-hash: 0e7c5a93159076952f609e05760e2458828d0d1f
    commit-date: 2018-04-06
    PS D:\Programms\Rust\melos> rustc -vV
    rustc 1.26.2 (594fb253c 2018-06-01)
    binary: rustc
    commit-hash: 594fb253c2b02b320c728391a425d028e6dc7a09
    commit-date: 2018-06-01
    host: x86_64-pc-windows-msvc
    release: 1.26.2
    LLVM version: 6.0
    
    opened by AlexNav73 4
  • Allow a feature flag to build for iOS

    Allow a feature flag to build for iOS

    It would be necessary to set some defines (which ones I'm not sure of yet) to get this to build (and by proxy Rodio) for iOS.

    https://github.com/lieff/minimp3/blob/eaa7e4d3f7ae790c02ffe88442cf333c6b5ffe58/player/stb_image.h#L213

    opened by seivan 3
  • Write a safe wrapper around the generated bindings

    Write a safe wrapper around the generated bindings

    As in title. See examples/example.rs for usage.

    Moves the unsafe bindings to a separate crate, minimp3-sys.

    These changes make it possible to safely integrate minimp3 into Rodio and finally make progress towards closing tomaka/rodio#36.

    • [x] Decoder abstraction
      • [x] Frame decoding
      • [x] Manages filling data buffer from a R: Read
    • [x] Docs
    opened by barzamin 3
  • Build fails

    Build fails

    OS: macOS 11.0.1 rustc: 1.48.0-nightly (dbb73f8f7 2020-09-12)

    Happens when trying to use the rodio crate.

    Attempt 1

    error: failed to run custom build command for `minimp3-sys v0.3.2`
    
    Caused by:
      process didn't exit successfully: `<project path>/target/debug/build/minimp3-sys-1d780ec51db6778d/build-script-build` (exit code: 1)
      --- stdout
      TARGET = Some("x86_64-apple-darwin")
      OPT_LEVEL = Some("0")
      HOST = Some("x86_64-apple-darwin")
      CC_x86_64-apple-darwin = None
      CC_x86_64_apple_darwin = None
      HOST_CC = None
      CC = Some("/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9")
      CFLAGS_x86_64-apple-darwin = None
      CFLAGS_x86_64_apple_darwin = None
      HOST_CFLAGS = None
      CFLAGS = None
      CRATE_CC_NO_DEFAULTS = None
      DEBUG = Some("true")
      CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,mmx,sse,sse2,sse3,ssse3")
      running: "/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "minimp3/" "-Wall" "-Wextra" "-DMINIMP3_IMPLEMENTATION" "-o" "<project path>/target/debug/build/minimp3-sys-1a06bf2a4367be65/out/minimp3.o" "-c" "minimp3.c"
    
      --- stderr
    
    
      error occurred: Failed to find tool. Is `gcc-9` installed?
    

    I've installed gcc@9 using brew, created a directory /usr/local/Cellar/gcc/9.2.0_3/ and linked the bin/ folder from the installed version there. I did it because the script was looking for this specific version of gcc despite it not being installed. I'm pretty sure it's not the proper way to do it but I didn't know how else to make minimp3-sys build script look for a default version of gcc (under gcc alias) without making a custom version of the minimp3-sys crate with a modified build script. Anyway, that error went away but there was another one now.

    Attempt 2

       Compiling minimp3-sys v0.3.2
    The following warnings were emitted during compilation:
    
    warning: In file included from /usr/local/Cellar/gcc@9/9.3.0/lib/gcc/9/gcc/x86_64-apple-darwin20/9.3.0/include/stdint.h:9,
    warning:                  from minimp3/minimp3.h:9,
    warning:                  from minimp3.c:1:
    warning: /usr/local/Cellar/gcc@9/9.3.0/lib/gcc/9/gcc/x86_64-apple-darwin20/9.3.0/include-fixed/stdint.h:27:10: fatal error: sys/_types/_int8_t.h: No such file or directory
    warning:    27 | #include <sys/_types/_int8_t.h>
    warning:       |          ^~~~~~~~~~~~~~~~~~~~~~
    warning: compilation terminated.
    
    error: failed to run custom build command for `minimp3-sys v0.3.2`
    
    Caused by:
      process didn't exit successfully: `<project path>/target/debug/build/minimp3-sys-1d780ec51db6778d/build-script-build` (exit code: 1)
      --- stdout
      TARGET = Some("x86_64-apple-darwin")
      OPT_LEVEL = Some("0")
      HOST = Some("x86_64-apple-darwin")
      CC_x86_64-apple-darwin = None
      CC_x86_64_apple_darwin = None
      HOST_CC = None
      CC = Some("/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9")
      CFLAGS_x86_64-apple-darwin = None
      CFLAGS_x86_64_apple_darwin = None
      HOST_CFLAGS = None
      CFLAGS = None
      CRATE_CC_NO_DEFAULTS = None
      DEBUG = Some("true")
      CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,mmx,sse,sse2,sse3,ssse3")
      running: "/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "minimp3/" "-Wall" "-Wextra" "-DMINIMP3_IMPLEMENTATION" "-o" "<project path>/target/debug/build/minimp3-sys-1a06bf2a4367be65/out/minimp3.o" "-c" "minimp3.c"
      cargo:warning=In file included from /usr/local/Cellar/gcc@9/9.3.0/lib/gcc/9/gcc/x86_64-apple-darwin20/9.3.0/include/stdint.h:9,
      cargo:warning=                 from minimp3/minimp3.h:9,
      cargo:warning=                 from minimp3.c:1:
      cargo:warning=/usr/local/Cellar/gcc@9/9.3.0/lib/gcc/9/gcc/x86_64-apple-darwin20/9.3.0/include-fixed/stdint.h:27:10: fatal error: sys/_types/_int8_t.h: No such file or directory
      cargo:warning=   27 | #include <sys/_types/_int8_t.h>
      cargo:warning=      |          ^~~~~~~~~~~~~~~~~~~~~~
      cargo:warning=compilation terminated.
      exit code: 1
    
      --- stderr
    
    
      error occurred: Command "/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "minimp3/" "-Wall" "-Wextra" "-DMINIMP3_IMPLEMENTATION" "-o" "<project path>/target/debug/build/minimp3-sys-1a06bf2a4367be65/out/minimp3.o" "-c" "minimp3.c" with args "gcc-9" did not execute successfully (status code exit code: 1).
    
    opened by micouy 2
  • [Security] Bump slice-deque from 0.1.16 to 0.2.0

    [Security] Bump slice-deque from 0.1.16 to 0.2.0

    Bumps slice-deque from 0.1.16 to 0.2.0. This update includes security fixes.

    Vulnerabilities fixed

    Sourced from The RustSec Advisory Database.

    Bug in SliceDeque::move_head_unchecked corrupts its memory Affected versions of this crate entered a corrupted state if mem::size_of::<T>() % allocation_granularity() != 0 and a specific allocation pattern was used: sufficiently shifting the deque elements over the mirrored page boundary.

    This allows an attacker that controls controls both element insertion and removal to corrupt the deque, such that reading elements from it would read bytes corresponding to other elements in the deque. (e.g. a read of T could read some bytes from one value and some bytes from an adjacent one, resulting in a T whose value representation is not meaningful). This is undefined behavior.

    The flaw was corrected by using a pair of pointers to track the head and tail of the deque instead of a pair of indices. This pair of pointers are represented using a Rust slice.

    Patched versions: >= 0.2.0 Unaffected versions: none

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies security 
    opened by dependabot-preview[bot] 2
  • Update tokio requirement from 0.2 to 1.0

    Update tokio requirement from 0.2 to 1.0

    Updates the requirements on tokio to permit the latest version.

    Release notes

    Sourced from tokio's releases.

    Tokio v1.0.0

    Commit to the API and long-term support.

    Announcement and more details.

    Fixed

    • sync: spurious wakeup in watch (#3234).

    Changed

    • io: rename AsyncFd::with_io() to try_io() (#3306)
    • fs: avoid OS specific *Ext traits in favor of conditionally defining the fn (#3264).
    • fs: Sleep is !Unpin (#3278).
    • net: pass SocketAddr by value (#3125).
    • net: TcpStream::poll_peek takes ReadBuf (#3259).
    • rt: rename runtime::Builder::max_threads() to max_blocking_threads() (#3287).
    • time: require current_thread runtime when calling time::pause() (#3289).

    Removed

    • remove tokio::prelude (#3299).
    • io: remove AsyncFd::with_poll() (#3306).
    • net: remove {Tcp,Unix}Stream::shutdown() in favor of AsyncWrite::shutdown() (#3298).
    • stream: move all stream utilities to tokio-stream until Stream is added to std (#3277).
    • sync: mpsc try_recv() due to unexpected behavior (#3263).
    • tracing: make unstable as tracing-core is not 1.0 yet (#3266).

    Added

    • fs: poll_* fns to DirEntry (#3308).
    • io: poll_* fns to io::Lines, io::Split (#3308).
    • io: _mut method variants to AsyncFd (#3304).
    • net: poll_* fns to UnixDatagram (#3223).
    • net: UnixStream readiness and non-blocking ops (#3246).
    • sync: UnboundedReceiver::blocking_recv() (#3262).
    • sync: watch::Sender::borrow() (#3269).
    • sync: Semaphore::close() (#3065).
    • sync: poll_recv fns to mpsc::Receiver, mpsc::UnboundedReceiver (#3308).
    • time: poll_tick fn to time::Interval (#3316).
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 1
  • Update tokio requirement from 0.2 to 0.3

    Update tokio requirement from 0.2 to 0.3

    Updates the requirements on tokio to permit the latest version.

    Release notes

    Sourced from tokio's releases.

    Tokio v0.3.0

    This represents a 1.0 beta release. APIs are polished and future-proofed. APIs not included for 1.0 stabilization have been removed.

    Biggest changes are:

    • I/O driver internal rewrite. The windows implementation includes significant changes.
    • Runtime API is polished, especially with how it interacts with feature flag combinations.
    • Feature flags are simplified
      • rt-core and rt-util are combined to rt
      • rt-threaded is renamed to rt-multi-thread to match builder API
      • tcp, udp, uds, dns are combied to net.
      • parking_lot is included with full

    Changes

    • meta: Minimum supported Rust version is now 1.45.
    • io: AsyncRead trait now takes ReadBuf in order to safely handle reading into uninitialized memory (#2758).
    • io: Internal I/O driver storage is now able to compact (#2757).
    • rt: Runtime::block_on now takes &self (#2782).
    • sync: watch reworked to decouple receiving a change notification from receiving the value (#2814, #2806).
    • sync: Notify::notify is renamed to notify_one (#2822).
    • process: Child::kill is now an async fn that cleans zombies (#2823).
    • sync: use const fn constructors as possible (#2833, #2790)
    • signal: reduce cross-thread notification (#2835).
    • net: tcp,udp,uds types support operations with &self (#2828, #2919, #2934).
    • sync: blocking mpsc channel supports send with &self (#2861).
    • time: rename delay_for and delay_until to sleep and sleep_until (#2826).
    • io: upgrade to mio 0.7 (#2893).
    • io: AsyncSeek trait is tweaked (#2885).
    • fs: File operations take &self (#2930).
    • rt: runtime API, and #[tokio::main] macro polish (#2876)
    • rt: Runtime::enter uses an RAII guard instead of a closure (#2954).

    Added

    • sync: map function to lock guards (#2445).
    • sync: blocking_recv and blocking_send fns to mpsc for use outside of Tokio (#2685).
    • rt: Builder::thread_name_fn for configuring thread names (#1921).
    • fs: impl FromRawFd and FromRawHandle for File (#2792).
    • process: Child::wait and Child::try_wait (#2796).
    • rt: support configuring thread keep-alive duration (#2809).
    • rt: task::JoinHandle::abort forcibly cancels a spawned task (#2474).
    • sync: RwLock write guard to read guard downgrading (#2733).
    • net: add poll_* functions that take &self to all net types (#2845)
    • sync: get_mut() for Mutex, RwLock (#2856).
    • sync: mpsc::Sender::closed() waits for Receiver half to close (#2840).
    • sync: mpsc::Sender::is_closed() returns true if Receiver half is closed (#2726).
    • stream: iter and iter_mut to StreamMap (#2890).
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 1
  • Crates.io version is late compared to the documentation version

    Crates.io version is late compared to the documentation version

    The readme on Github invites to install version 0.4, but crates.io version only goes up to 0.3.5, so version 0.4 isn't installable. This prevents from working with the async_tokio feature.

    Capture d’écran 2020-08-23 à 19 55 29 Capture d’écran 2020-08-23 à 19 56 05
    opened by abocquet 1
  • Bump slice-deque from 0.2.4 to 0.3.0

    Bump slice-deque from 0.2.4 to 0.3.0

    Bumps slice-deque from 0.2.4 to 0.3.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 1
  • minimp3 causes iOS app store rejection due to slice_deque use

    minimp3 causes iOS app store rejection due to slice_deque use

    Heads up, using the mp3 Bevy feature will cause your iOS app to get rejected because minimp3 depends on slice_deque which uses an internal API for memory allocation.

    First reported in bevyengine/bevy#3145. minimp3-rs is a doubly-transitive dependency of ours.

    The dependency that you're using here seems to be unmaintained, so migrating away is likely the only real solution.

    opened by alice-i-cecile 4
  • Minimp3: test failed on fedora copr

    Minimp3: test failed on fedora copr

    https://download.copr.fedorainfracloud.org/results/remilauzier/zemeroth/fedora-rawhide-x86_64/02304844-rust-minimp3/builder-live.log.gz

    error[E0599]: no method named next_frame_future found for struct Decoder<tokio::fs::File> in the current scope --> examples/example_tokio.rs:19:23 | 19 | match decoder.next_frame_future().await { | ^^^^^^^^^^^^^^^^^ method not found in Decoder<tokio::fs::File>

    error: aborting due to previous error

    bug 
    opened by ghost 3
  • minimp3-sys: compile error in fedora copr

    minimp3-sys: compile error in fedora copr

    https://download.copr.fedorainfracloud.org/results/remilauzier/zemeroth/fedora-rawhide-x86_64/02304837-rust-minimp3-sys/builder-live.log.gz

    error: couldn't read examples/../minimp3/vectors/M2L3_bitrate_24_all.bit: No such file or directory (os error 2) --> examples/example.rs:31:15 | 31 | let mp3 = include_bytes!("../minimp3/vectors/M2L3_bitrate_24_all.bit"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

    opened by ghost 4
  • minimp3-sys: include license file

    minimp3-sys: include license file

    Hi. fedora would like to have a license file include in the crate source. https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/ https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text

    enhancement 
    opened by ghost 2
  • Clean up .gitignore

    Clean up .gitignore

    • Cleaned up the .gitignore file
    • Added comments that explain in detail what belongs in a project's .gitignore and what not

    I am well aware that many projects are handling the Git exclusions in a wrong way, even very popular ones. This usually results in a big mess after a while if every contributor is adding their custom exclusions that should instead be maintained locally.

    opened by uklotzde 0
Releases(v0.3.3)
  • v0.3.3(May 8, 2019)

Owner
german gömez
german gömez
High-level PortMidi bindings and wrappers for Rust

portmidi-rs High-level PortMidi bindings for Rust. PortMidi website: http://portmedia.sourceforge.net/portmidi/ Installation Add this to your Cargo.to

Philippe Delrieu 69 Dec 1, 2022
PortAudio bindings and wrappers for Rust.

rust-portaudio PortAudio bindings and wrappers for Rust. PortAudio is a free, cross-platform, open-source, audio I/O library. rust-portaudio is still

null 331 Dec 23, 2022
Rust bindings for the soloud audio engine library

soloud-rs A crossplatform Rust bindings for the soloud audio engine library. Supported formats: wav, mp3, ogg, flac. The library also comes with a spe

Mohammed Alyousef 38 Dec 8, 2022
PortAudio bindings and wrappers for Rust.

rust-portaudio PortAudio bindings and wrappers for Rust. PortAudio is a free, cross-platform, open-source, audio I/O library. rust-portaudio is still

null 332 Dec 30, 2022
Spotify for the terminal written in Rust 🚀

Spotify TUI A Spotify client for the terminal written in Rust. The terminal in the demo above is using the Rigel theme. Spotify TUI Installation Homeb

Alexander Keliris 14.1k Jan 1, 2023
A rust binding for the FMOD library

rust-fmod This is a rust binding for FMOD, the library developped by FIRELIGHT TECHNOLOGIES. FMOD website : www.fmod.org You can also find it on crate

Guillaume Gomez 55 Nov 2, 2022
Easy Api in Rust to play Sounds

ears ears is a simple library to play sounds and music in Rust. Provides an access to the OpenAL spatialization functionality in a simple way. Accepts

Jan Niklas Hasse 82 Jan 1, 2023
Cross-platform audio I/O library in pure Rust

CPAL - Cross-Platform Audio Library Low-level library for audio input and output in pure Rust. This library currently supports the following: Enumerat

null 1.8k Jan 8, 2023
Rust audio playback library

Audio playback library Rust playback library. Playback is handled by cpal. MP3 decoding is handled by minimp3. WAV decoding is handled by hound. Vorbi

null 1.2k Jan 1, 2023
A music theory guide written in Rust.

Rust Music Theory A library and executable that provides programmatic implementation of the basis of the music theory. Table of Contents Overview Usag

Ozan Kaşıkçı 551 Dec 21, 2022
A Rust environment for sound synthesis and algorithmic composition.

Sorceress A Rust environment for sound synthesis and algorithmic composition, powered by SuperCollider. Overview Sorceress is a Rust crate that provid

Wesley Merkel 82 Dec 26, 2022
Implements the free and open audio codec Opus in Rust.

opus-native Overview Implements the free and open audio codec Opus in Rust. Status This crate is under heavy development. Most functionality is not wo

Nils Hasenbanck 9 Nov 28, 2022
Gtk/Rust native Spotify client for the GNOME desktop.

Gtk/Rust native Spotify client for the GNOME desktop.

Alexandre Trendel 1.7k Jan 1, 2023
mpc, but implemented in Rust.

rsmpc mpc, but implemented in Rust. Note: This is not meant to be a direct implementation, there will be some differences. For example: I moved the op

Cpt.Howdy 7 Jun 8, 2022
Symphonia is a pure Rust audio decoding and media demuxing library supporting AAC, FLAC, MP3, MP4, OGG, Vorbis, and WAV.

Pure Rust multimedia format demuxing, tag reading, and audio decoding library

Philip Deljanov 1k Jan 2, 2023
A music bot build in Serenity/Rust.

Sunny Flowers is a Discord bot to play media in voice channels. It uses Serenity and Songbird to accomplish this.

Sophie 11 Nov 5, 2022
musify is a simple discord bot to play music within a voice channel, written in the rust programming language.

musify-rs musify is a simple discord bot to play music within a voice channel, written in the rust programming language. Features A simple song queue

NV6 5 Aug 14, 2022
Rust speech synth

Grail-rs (Work in progress) Grail, A simple formant speech synthesizer, built for portability This is the rust version The goal of this synthesizer is

Dimev 16 Dec 28, 2022
A Spotify downloader written in rust, which does not require a premium account

DownOnSpot A Spotify downloader written in Rust Disclaimer DownOnSpot was not developed for piracy. It is meant to be used in compliance with DMCA, Se

oSumAtrIX 273 Jan 7, 2023