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
1
vote
1 answer

How to Play Multiple MP3 files simultaneously in SDL?

I want to play multiple MP3 files in SDL. Using SDL_Mixer, I am able to play one MP3 file. Mix_Music *music = Mix_LoadMUS("music.mp3"); Mix_PlayMusic(music, 0); But when I am trying to play another MP3 along with first one, the first one stops and…
Prithveesh
  • 148
  • 2
  • 7
1
vote
2 answers

tone generation with sdl_mixer exits with segmentation fault in ubuntu 12.04 64 bit

I have to write a simple sinthesizer at university which uses sdl_mixer to generate sine waves. I got a code from my teacher which work on windows correctly, but in ubuntu it exits with segmentation fault. I installed both sdl_mixer1.2-dev and…
1
vote
2 answers

error: cannot convert 'void (CApp::*)()' to 'void (*)()' for argument '1' to 'void Mix_HookMusicFinished(void (*)())'

I'm trying to create a C++ application using SDL and SDL_Mixer for audio, and am trying to follow this tutorial. However, using SDL_Mixer's Mix_HookMusicFinished() isn't working, giving the error: argument of type 'void (CApp::)()' does not match…
1
vote
2 answers

Linking errors with SDL_mixer library

I'm working with the SDL and SDL_mixer library and am getting the following errors when I compile: .... game.cpp:(.text+0x88f): undefined reference to `Mix_OpenAudio' Jukebox.o: In function `Jukebox::~Jukebox()': Jukebox.cpp:(.text+0x17): undefined…
MrDiggles
  • 748
  • 1
  • 5
  • 19
1
vote
1 answer

How can I play sound on two separate sound cards with SDL?

I have two sound cards on my machine, and I'm developing an application playing sounds via SDL_mixer. I want some of these sounds played on first card and some on others. How can I achieve that in Windows? It doesn't even have to be a single…
akalenuk
  • 3,815
  • 4
  • 34
  • 56
1
vote
1 answer

Crashed SDL_Mixer once; now all programs that use SDL_Mixer crash on initialization

I was going through this tutorial on audio using SDL_mixer and everything went just fine. After that I decided to experiment, play, and learn through exploration, so I made a program that was very similar, had two sound channels, and let me play…
Rayne
  • 33
  • 6
0
votes
0 answers

SDL Mixer No available audio device

This is what I have and I keep getting no available audio devices when trying to run the program. By the way I'm on ubuntu 11.04. #include #include #include #include #include int main(){ …
csteifel
  • 2,854
  • 6
  • 35
  • 61
0
votes
1 answer

Cannot install sdl_mixer with conan

I have a project that already uses SDL2, sdl_image and sdl_ttf, I want to add sdl_mixer to it. My conanfile.py looks like this: from conan import ConanFile class CompressorRecipe(ConanFile): settings = "os", "compiler", "build_type", "arch" …
SavedowW
  • 39
  • 5
0
votes
0 answers

Problem with playing the next song automatically with SDL_Mixer

I have this c program which used to search for the mp3 files of given directory and add the files data to linked list.i use SDL2 for audio handling. so much far i would be able to get the playing of mp3 file and what i'm facing here is that i don't…
devMe
  • 126
  • 10
0
votes
1 answer

CMake error, SDL_mixer could not find libxmp

CMake Error: CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find libxmp (missing: libxmp_LIBRARY libxmp_INCLUDE_PATH) Call Stack (most recent call first): …
HUSTRIK
  • 1
  • 1
  • 1
0
votes
1 answer

Mix_PlayMusic() not playing music

I have this program which used to load mp3 file from cmd argument but when i use the Mix_PlayMusic the audio isn't playing: #include #include #include #include #include #include…
devMe
  • 126
  • 10
0
votes
0 answers

Why will Mix_OpenAudio() not open for SDL_mixer?

Below is my code in Visual Studio 2022: #include #include #include using namespace std; int main(int arc, char* argv[]) { SDL_Init(SDL_INIT_EVERYTHING); if (!Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2,…
0
votes
0 answers

why is incorrect audio format?

when i start the code i get warning: incorrect audio format i figured out its related to the mp3 file. whats the problem and how can i fix it? i already tried to convert the mp3 to a wav file but that also didnt work. is it possible that 3mb of mp3…
0
votes
0 answers

Mix_OpenAudio Closes Program Without Creating Window

I want to create a simple program that lets me move around a little sprite with some music. I'm able to bring up a window, my next step is getting some music. I have everything setup properly as when I build my main.exe with make it builds…
Leona12
  • 3
  • 2
0
votes
1 answer

How to determine if a channel has stopped playing a chunk in SDL2

I am trying to create footstep sounds in sdl2. It plays fine but it ignores the sound that is already playing in the channel. So when I move the player the footstep sound plays like a machine gun(it overplays itself). //Declaration Mix_chunk*…
yolowex
  • 31
  • 5