sdl-mixer

No audio with SDL/C++

半城伤御伤魂 提交于 2021-01-28 05:11:05
问题 void LoadMusic(string path); Mix_Music* gMusic = NULL; LoadMusic("Music/bubble-bobble.mp3"); if(Mix_PlayingMusic() == 0) { Mix_PlayMusic(gMusic, -1); } if(Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 2048) < 0) { cout << "Mixer could not initialise. error: " << Mix_GetError(); return false; } Mix_FreeMusic(gMusic); gMusic = NULL; void LoadMusic(string path) { gMusic = Mix_LoadMUS(path.c_str()); if(gMusic == NULL) { cout << "Failed to load background music! Error: " << Mix_GetError() << endl; }

SDL-Mixer audio stops upon starting Reactive-Banana input loop

我们两清 提交于 2020-01-14 22:52:43
问题 I've been working on a game that uses multiple audio tracks whose volumes are adjusted in realtime based on mouse motion. I'm using SDl-Mixer for audio, and Reactive-Banana for the game in general. The problem is that the tracks, which have all been started at the beginning, stop playing when the input-loop starts. The cause may be something else, but I wonder if there's some strange interaction between SDL and Reactive-Banana that I don't understand. I've been trying to puzzle this out for a

SDL-Mixer audio stops upon starting Reactive-Banana input loop

孤人 提交于 2020-01-14 22:51:33
问题 I've been working on a game that uses multiple audio tracks whose volumes are adjusted in realtime based on mouse motion. I'm using SDl-Mixer for audio, and Reactive-Banana for the game in general. The problem is that the tracks, which have all been started at the beginning, stop playing when the input-loop starts. The cause may be something else, but I wonder if there's some strange interaction between SDL and Reactive-Banana that I don't understand. I've been trying to puzzle this out for a

SDL-Mixer audio stops upon starting Reactive-Banana input loop

♀尐吖头ヾ 提交于 2020-01-14 22:51:27
问题 I've been working on a game that uses multiple audio tracks whose volumes are adjusted in realtime based on mouse motion. I'm using SDl-Mixer for audio, and Reactive-Banana for the game in general. The problem is that the tracks, which have all been started at the beginning, stop playing when the input-loop starts. The cause may be something else, but I wonder if there's some strange interaction between SDL and Reactive-Banana that I don't understand. I've been trying to puzzle this out for a

How to statically compile an SDL game on Windows

╄→尐↘猪︶ㄣ 提交于 2019-11-28 04:25:19
I have been trying to produce a statically linked "single binary" version of my game for windows. I want to link with sdl, sdl_image and sdl_mixer which in turn pull in a few support libraries. Unfortunately I haven't found a way to get them all to compile and link using cygwin/mingw/gcc. As far as I can tell all existing public versions are only shared libraries / dlls. Please note that I'm not talking about licencing here. The source will be open thus the GPL/LGPLness of sdl is not relevant. When compiling your project, you need to make just a couple changes to your makefile. Instead of sdl

How to statically compile an SDL game on Windows

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 00:23:58
问题 I have been trying to produce a statically linked "single binary" version of my game for windows. I want to link with sdl, sdl_image and sdl_mixer which in turn pull in a few support libraries. Unfortunately I haven't found a way to get them all to compile and link using cygwin/mingw/gcc. As far as I can tell all existing public versions are only shared libraries / dlls. Please note that I'm not talking about licencing here. The source will be open thus the GPL/LGPLness of sdl is not relevant