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

Cannot run demo on OSX using Homebrew #59

Closed
johnthagen opened this issue Oct 24, 2016 · 4 comments
Closed

Cannot run demo on OSX using Homebrew #59

johnthagen opened this issue Oct 24, 2016 · 4 comments

Comments

@johnthagen
Copy link
Contributor

When I try to play a simple WAV file on OSX using the demo example I receive the following output:

/Users/hagenjt1/.cargo/bin/cargo run --example demo piano.wav
   Compiling sdl2_mixer v0.24.0 (file:///Users/hagenjt1/GitHub/rust-sdl2_mixer)
    Finished debug [unoptimized + debuginfo] target(s) in 0.44 secs
     Running `target/debug/examples/demo piano.wav`
linked version: 2.0.1
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Mixer not built with Ogg Vorbis support"', ../src/libcore/result.rs:788
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: Process didn't exit successfully: `target/debug/examples/demo piano.wav` (exit code: 101)

Process finished with exit code 101

I've brew installed the following packages:

brew list --versions
sdl2 2.0.4
sdl2_mixer 2.0.1

Was there some kind of configuration step I've missed?

Environment:

  • OSX 10.11.6
  • Rust stable 1.12.1
  • Cargo 0.13.0
  • Homebrew 1.0.8
@andelf
Copy link
Owner

andelf commented Oct 24, 2016

Can you post your brew info sdl2_mixer

@johnthagen
Copy link
Contributor Author

$ brew info sdl2_mixer
sdl2_mixer: stable 2.0.1 (bottled), HEAD
Sample multi-channel audio mixer library
https://www.libsdl.org/projects/SDL_mixer/
/usr/local/Cellar/sdl2_mixer/2.0.1 (9 files, 378.2K) *
  Poured from bottle on 2016-10-23 at 20:25:11
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/sdl2_mixer.rb
==> Dependencies
Build: pkg-config ✘
Required: sdl2 ✔
Optional: flac ✘, fluid-synth ✘, smpeg2 ✘, libmikmod ✘, libmodplug ✘, libvorbis ✘
==> Options
--universal
    Build a universal binary
--with-flac
    Build with flac support
--with-fluid-synth
    Build with fluid-synth support
--with-libmikmod
    Build with libmikmod support
--with-libmodplug
    Build with libmodplug support
--with-libvorbis
    Build with libvorbis support
--with-smpeg2
    Build with smpeg2 support
--HEAD
    Install HEAD version

After doing some more research, it looks like the --with-flac, --with-fluid-synth, etc are probably needed?

@johnthagen
Copy link
Contributor Author

I was able to get a .wav file to play using the following install:

$ brew install sdl2_mixer --with-flac --with-fluid-synth --with-libmikmod --with-libmodplug --with-libvorbis --with-smpeg2
brew list --versions
flac 1.3.1
fluid-synth 1.1.6
gettext 0.19.8.1
glib 2.50.1
libffi 3.0.13
libmikmod 3.3.8
libmodplug 0.8.8.5
libogg 1.3.2
libvorbis 1.3.5
pcre 8.39
pkg-config 0.29.1_2
sdl2 2.0.4
sdl2_mixer 2.0.1
smpeg2 2.0.0

Should this be the default way to install sdl2_mixer to work with rust-sdl2_mixer? If so, I'm happy to open a PR and update the README to help others.

@andelf
Copy link
Owner

andelf commented Oct 24, 2016

👍 Yes, because default brew sdl2_mixer installation supports limited file formats.
A PR for updating README is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants