Questions tagged [sdl-mixer]

SDL_mixer is a sample multi-channel audio mixer library. It supports any number of simultaneously playing channels of 16 bit stereo audio, plus a single channel of music, mixed by the popular FLAC, MikMod MOD, Timidity MIDI, Ogg Vorbis, and SMPEG MP3 libraries.

117 questions
17
votes
5 answers

How to statically compile an SDL game on Windows

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…
Sec
  • 7,059
  • 6
  • 31
  • 58
6
votes
5 answers

SDL_Mixer MIDI Volume issues on Windows Vista/7

I'm not actually well versed in C++ or SDL_Mixer, but I'm asking this question anyway on behalf on the Doom community. Put simply, nobody writing Doom source ports can seem to figure out how to control normal sound volume and MIDI sound volume…
AlexMax
  • 1,204
  • 14
  • 36
5
votes
2 answers

What's the difference between Mix_Chunk and Mix_Music?

When should I use Mix_Chunk instead of Mix_Music?
user1188243
  • 61
  • 1
  • 5
5
votes
1 answer

make can't find SDL_mixer.h but I included the SDL dir

I'm trying to build eduke32 from source . It requires, among other things, SDL_mixer.h. I do have it : $ locate SDL_mixer.h /usr/include/SDL/SDL_mixer.h (I have Devel Tools group installed, as well as a lot of other dev packages) But when I start…
Lioobayoyo
  • 156
  • 1
  • 7
4
votes
1 answer

I have an unintended delay in playing a Mix_Chunk

So I am trying to learn SDL and creating a small game. When the user presses the space bar, it should play a sound. This works, but the sound takes about .5 seconds to play... How would I fix this? I've checked the actual file to see if the delay…
Justen
  • 4,859
  • 9
  • 44
  • 68
4
votes
2 answers

Running music as SDL_Mixer chunks

Currently, SDL_Mixer has two types of sound resources: chunks and music. Apart from the API and supported formats limitations, are there any reasons not to load and play music as a SDL_Chunk and channel? (memory, speed, etc.)
luiscubal
  • 24,773
  • 9
  • 57
  • 83
3
votes
3 answers

SDL_Mixer: crash Mix_FreeMusic();

I'm working on my project in SDL, with SDL_mixer. Everything sounds ok, but when I attempt to quit, my app crash. I think that it's related to Mix_FreeMusic function (I figured that out after using a lot of breakpoints) - I marked that line in code…
Greg Witczak
  • 1,634
  • 4
  • 27
  • 56
3
votes
1 answer

Play one sound after another with SDL_mixer?

I have 4 sounds. I need play sound 1, when it finishes, automatically play sound 2; when sound 2 finishes, automatically play sound 3. Soun 3 finishes, play sound 4.... I'm using SDL Mixer 2.0, no SDL Sound...Is there a way? int main() { int…
mrsoliver
  • 91
  • 2
  • 8
3
votes
1 answer

SDL_Mixer 2.0.4 "MP3 support not available" even though libmpg123 is installed

I am a beginner to programming and am trying to make a simple console MP3 player as a project. For this, I need a way to play .mp3 files. SDL Mixer provides this facility but requires libmpg123 installed on one's system. Call to 'Mix_Init()' always…
DS2830
  • 203
  • 1
  • 9
3
votes
1 answer

SDL2_Mixer: Mix_Init unnecessary for statically-linked audio libraries?

I'm developing a program using SDL2 (and all the extension libraries). One of those libraries is, of course, SDL_Mixer v2.0.2. With SDL_Mixer, all of the examples and tutorials use the Mix_Init function (along with a subsequent Mix_Quit at the end…
Griffort
  • 1,174
  • 1
  • 10
  • 26
3
votes
1 answer

C++ SDL Mixer Mix_Music : incomplete type is not allowed

whenever I try to create Mix_Music instance, I get this error: "incomplete type is not allowed". However, I need to get the address of the pointer music before calling Mix_LoadMUS(file); Code: Mix_Music *music; /* I need the memory address here…
Klokop
  • 31
  • 2
3
votes
1 answer

SDL_Mixer not working on part of the code

I've just a strange problem. I'm looking to put sounds in my game. It's a game with two phases. One of rpg and one of fight. In rpg you can launch a fight when you walk on a monster. In my code i use 3 times SDL_mixer to play music (in the menu and…
3
votes
1 answer

When do I need to use mixer pre-init as oppsed to just mixer.init?

What is the difference between pygame.mixer init and pygame.mixer pre init? I saw a tutorial and he used pre-init, but the explanation wasn't clear. Should I just use mixer init, or do both?
marienbad
  • 1,461
  • 1
  • 9
  • 19
3
votes
1 answer

SDL_mixer stop playing music on certain event

My program needs to stop playing sound if certain point is in range, for that I have class with function run() which runs on seperate thread and plays sound using SDL.h and SDL_mixer.h: void SoundCheck::run() { Mix_PlayMusic(music, 1); …
Cynizm
  • 99
  • 1
  • 8
3
votes
0 answers

SDL_Mixer error "Mixer not built with ... support"

I am trying to play music in the background of a game I'm working on. I'm using SDL2 and SDL-mixer for the first time. I compiled them myself and put the files at the root of my program folder (for portability purposes). Now when I run the game, no…
starmatt
  • 31
  • 5
1
2 3 4 5 6 7 8