germangb / minimp3-rs Goto Github PK
View Code? Open in Web Editor NEWminimp3 rust bindings + wrapper
License: MIT License
minimp3 rust bindings + wrapper
License: MIT License
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
Is it possible to get the length of the audio file before reading each frame?
RustAudio/rodio#293
next_frame
seems to always return Some
.
Hi,
I used this library through rodio.
But I found decoding operation of some my files were failed even if they are playable on other players.
I found that problem of my files, that is ID3v1.
I think that it seems that handling part for ID3v1 tag is not here.
How about adding option to handle ID3v1 tag?
More information is here.
According to minimp3's README, mp3dec_decode_frame will skip ID3 data.
The decoder will analyze the input buffer to properly sync with the MP3 stream, and will skip ID3 data, as well as any data which is not valid.
But they do not handle ID3v1 tag in mp3dec_decode_frame.
Hence, decoding some mp3 files having ID3v1 tag fail because they try parse tag data as sound data.
That also mentioned in README of minimp3.
At end of stream just pass rest of the buffer, sync procedure should work even with just 1 frame in stream (except for free format and garbage at the end can mess things up, so id3v1 and ape tags must be removed first).
Here is sample files contain ID3v1 tag.
These are related issues for your information
OS: macOS 11.0.1
rustc: 1.48.0-nightly (dbb73f8f7 2020-09-12)
Happens when trying to use the rodio
crate.
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.
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).
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
This might not even be an issue with this crate as it's failing to compile C files but I wonder if I'm missing something. Looks like it's using an older compiler standard than it's supposed to be using.
Any tips on resolving this?
error: failed to run custom build command for `minimp3-sys v0.3.1`
process didn't exit successfully: `D:\Workspace\rust\honkio\target\release\build \minimp3-sys-873c9c49e757c783\build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-pc-windows-msvc")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-pc-windows-msvc")
CC_x86_64-pc-windows-msvc = None
CC_x86_64_pc_windows_msvc = None
HOST_CC = None
CC = None
CFLAGS_x86_64-pc-windows-msvc = None
CFLAGS_x86_64_pc_windows_msvc = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,mmx,sse,sse2")
DEBUG = Some("false")
running: "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\x86_am d64\\cl.exe" "/nologo" "/MD" "/O2" "/I" "minimp3/" "/W4" "/DMINIMP3_IMPLEMENTATI ON" "/FoD:\\Workspace\\rust\\honkio\\target\\release\\build\\minimp3-sys-d02cfb8 fbdd8ed8c\\out\\minimp3.o" "/c" "minimp3.c"
minimp3.c
minimp3/minimp3.h(409) : warning C4244: '=' : conversion from 'uint32_t' to 'uin t8_t', possible loss of data
minimp3/minimp3.h(579) : warning C4244: '=' : conversion from 'uint32_t' to 'uin t8_t', possible loss of data
minimp3/minimp3.h(617) : warning C4244: '=' : conversion from 'int' to 'uint8_t' , possible loss of data
minimp3/minimp3.h(618) : warning C4244: '=' : conversion from 'int' to 'uint8_t' , possible loss of data
minimp3/minimp3.h(935) : warning C4244: '=' : conversion from 'int' to 'uint8_t' , possible loss of data
minimp3/minimp3.h(1379) : error C2275: 'int16_t' : illegal use of this type as a n expression
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stdint.h( 9) : see declaration of 'int16_t'
minimp3/minimp3.h(1379) : error C2146: syntax error : missing ';' before identif ier 's'
minimp3/minimp3.h(1379) : error C2065: 's' : undeclared identifier
minimp3/minimp3.h(1380) : error C2065: 's' : undeclared identifier
minimp3/minimp3.h(1381) : error C2065: 's' : undeclared identifier
minimp3/minimp3.h(1381) : warning C4244: 'return' : conversion from 'int' to 'in t16_t', possible loss of data
minimp3/minimp3.h(1482) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa mple_t', possible loss of data
minimp3/minimp3.h(1483) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa mple_t', possible loss of data
minimp3/minimp3.h(1484) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa mple_t', possible loss of data
minimp3/minimp3.h(1485) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa mple_t', possible loss of data
minimp3/minimp3.h(1486) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa mple_t', possible loss of data
minimp3/minimp3.h(1487) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa mple_t', possible loss of data
minimp3/minimp3.h(1488) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa mple_t', possible loss of data
minimp3/minimp3.h(1489) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa mple_t', possible loss of data
exit code: 2
--- stderr
thread 'main' panicked at '
Internal error occurred: Command "C:\\Program Files (x86)\\Microsoft Visual Stud io 12.0\\VC\\bin\\x86_amd64\\cl.exe" "/nologo" "/MD" "/O2" "/I" "minimp3/" "/W4" "/DMINIMP3_IMPLEMENTATION" "/FoD:\\Workspace\\rust\\honkio\\target\\release\\bu ild\\minimp3-sys-d02cfb8fbdd8ed8c\\out\\minimp3.o" "/c" "minimp3.c" with args "c l.exe" did not execute successfully (status code exit code: 2).
', C:\Users\rk\.cargo\registry\src\github.com-1ecc6299db9ec823\cc-1.0.35\src\lib .rs:2398:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
I would like to know the number of samples in a file before I decode it (#21). An obvious way to do this would be to iterate over all frames and sum the sample count of each frame. But there is a problem. Iterating over a frame necessarily means decoding the samples. If I want to do one pass getting sample count and a second pass interpreting the sample, I will have to do the mp3 decode twice. This is inefficient.
Would it be possible to get a way to call next_frame()
but only get sample_rate
, channels
etc and not data
?
Hello, I'm working on a workspace, when building a crate from the top crate build fails, however everything is fine is the command is run directly, that is, inside the crate folder and with no extra arguments.
Running cargo test --no-run --lib --package=lily_common --message-format=json
...
Blocking waiting for file lock on package cache
Blocking waiting for file lock on build directory
Compiling minimp3-sys v0.3.2
Compiling minimp3 v0.5.1
error: could not find native static library minimp3
, perhaps an -L flag is missing?
Hi, fedora would like to know if it could be possible to unbundle minimp3.
https://bugzilla.redhat.com/show_bug.cgi?id=1976428#c1
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.
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.
@germangb any chance you could push the new minimp3 version and the minimp3-sys crate to crates.io?
With clang
building the C parts of it, this should be possible, right? ...right?
The main blocker I hit was the slice_deque
library, which uses Virtual Memory Tricks to give you a cheap ring buffer that's always linear. Webassembly doesn't have virtual memory, so you can't do that; see gnzlbg/slice_deque#60 for discussion.
So I was thinking the best solution would be to wrap the SliceDeque
that this library uses in a type that presents the same API but does copying under the hood when necessary on platforms that slice_deque
doesn't support. If you're willing I'll gladly contribute the changes.
Thanks so much!
Hope to support Windows
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
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.
next_frame()
has some unsafe code that dumps core, not entirely sure why this happens, the stream should be valid mp3, but either way this shouldn't happen.
$ RUST_BACKTRACE=1 cargo run
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s
Running `target/debug/foo`
thread 'main' panicked at library/core/src/panicking.rs:156:5:
unsafe precondition(s) violated: slice::get_unchecked_mut requires that the index is within the slice
stack backtrace:
0: rust_begin_unwind
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:645:5
1: core::panicking::panic_nounwind_fmt::runtime
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:110:18
2: core::panicking::panic_nounwind_fmt
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:123:9
3: core::panicking::panic_nounwind
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:156:5
4: <usize as core::slice::index::SliceIndex<[T]>>::get_unchecked_mut::precondition_check
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/intrinsics.rs:2799:21
5: <usize as core::slice::index::SliceIndex<[T]>>::get_unchecked_mut
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/slice/index.rs:252:9
6: core::slice::<impl [T]>::get_unchecked_mut
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/slice/mod.rs:728:24
7: slice_deque::SliceDeque<T>::extend_desugared
at /home/yuval/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slice-deque-0.3.0/src/lib.rs:1720:28
8: <slice_deque::SliceDeque<T> as slice_deque::SpecExtend<T,I>>::spec_extend
at /home/yuval/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slice-deque-0.3.0/src/lib.rs:2614:9
9: <slice_deque::SliceDeque<T> as slice_deque::SpecExtend<&T,I>>::spec_extend
at /home/yuval/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slice-deque-0.3.0/src/lib.rs:2702:9
10: <slice_deque::SliceDeque<T> as core::iter::traits::collect::Extend<&T>>::extend
at /home/yuval/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slice-deque-0.3.0/src/lib.rs:2856:9
11: minimp3::Decoder<R>::refill
at /home/yuval/.cargo/registry/src/index.crates.io-6f17d22bba15001f/minimp3-0.5.1/src/lib.rs:199:9
12: minimp3::Decoder<R>::next_frame
at /home/yuval/.cargo/registry/src/index.crates.io-6f17d22bba15001f/minimp3-0.5.1/src/lib.rs:177:22
13: foo::mp3::Mp3StreamDecoder<R>::new
at ./src/mp3.rs:32:29
14: foo::main
at ./src/main.rs:8:18
15: core::ops::function::FnOnce::call_once
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread caused non-unwinding panic. aborting.
Aborted (core dumped)
Making this issue here at the request of @germangb within the issue found here:
RustAudio/rodio#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.
Please review and discuss here: BOB450#2
It was build in response to implement seek in rodio. I would love to contribute this here however rodio needs the sec fix provided by the fork above. That is why I am pulling a request there instead of here.
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)
Hello,
as explained in this issue: gnzlbg/slice_deque#90, depending on the crate SliceDeque
will fail builds that run the cargo audit
command.
Would it be possible to circumvent this dependency with VecDeque
or similar since the maintainer of SliceDeque
seems to be unresponsive? From my understanding VecDeque
is Send
so switching would also remove an unsafe
impl in the codebase.
I could take a swing at this but for some reason I'm having problems building the project right now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.