Rust-SDL2 / rust-sdl2

SDL2 bindings for Rust
MIT License
2.71k stars 466 forks source link

CoreAudio error (AudioQueueStart): -66681 #901

Open Flaise opened 5 years ago

Flaise commented 5 years ago

Got this error: [ERROR] thread 'main' panicked at 'rust/src/audio.rs:46: "CoreAudio error (AudioQueueStart): -66681"': src/libcore/result.rs:999

...from this code:

use sdl2::mixer::{AUDIO_S16LSB, open_audio};

let frequency = 44100;
let format = AUDIO_S16LSB;
let channels = 2;
let chunk_a_size = 1024;

open_audio(frequency, format, channels, chunk_a_size).expect("...");

This is running on a Mac. I can't find any good information on Google or anything helpful in the SDL source code. Anyone know what this is?

Cobrand commented 5 years ago

Does the mixer-demo example work for you? ( cargo run --example mixer-demo --features "mixer" in a clone of this repo).

I couldn't find any info either. But if you could output the full code, that would be helpful. Remember that you have to initialize both SDL and SDL_mixer (they both have functions dedicated to do this).

dortamiguel commented 3 years ago

I'm getting this error randomly too, is there a solution for this?