Error Could Not Initialize Sdl_mixer
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this error initializing sdl no available video device site About Us Learn more about Stack Overflow the company Business Learn more
Error Initializing Sdl Emulationstation
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
Could Not Initialize Sdl Unable To Open Mouse
Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Initializing SDL_Mixer
Could Not Initialize Sdl Unable To Open A Console Terminal
gives error “No available audio device” up vote 1 down vote favorite 1 I am working on a C++ application which uses SDL/SDL_Mixer to play wav files. I've been developing the application on a Mac without much problem. However, I do need this application to work on Linux, so I put VirtualBox on my Windows 7 machine with Ubuntu 12.04 LTS. Compilation works fine, until could not initialize sdl - exiting I actually try to initialize the system. Then, SDL_Mixer gives an error "No available audio device." Here is the code where the error is thrown: using namespace std; void simple_sound_init() { if (SDL_Init(SDL_INIT_AUDIO) == -1) { fprintf(stderr, "init SDL error: %s\n", SDL_GetError()); SDL_Quit(); exit(1); } if (Mix_OpenAudio(SOUNDSAMPLERATE, MIX_DEFAULT_FORMAT, 1, 1024) != 0) { fprintf(stderr, "initialize audio error: %s\n", Mix_GetError()); Mix_CloseAudio(); SDL_Quit(); exit(1); } Mix_ChannelFinished(simple_sound_channel_finised); } The exact error I get is: initialize audio error: No available audio device P/S: I have searched extensively online for solutions and I've tried checking over the libraries install, etc. However, since it is possible that I've missed something, any basic library suggestions are welcome, and I will confirm that I have them set up. c++ ubuntu sdl share|improve this question edited May 7 '12 at 15:35 genpfault 35.5k83776 asked May 5 '12 at 19:22 A.P. 233 maybe you didn't set your virtual box properly –BЈовић May 5 '12 at 19:38 Any suggestions on how I may have set it up incorrectly? Sound works fine (other than this of course) with all other programs and the Guest Additions have been installed. –A.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up SDL_Mixer Audio not playing up vote 1 down vote favorite 1 Alright so here's the issue. I'm http://stackoverflow.com/questions/10465202/initializing-sdl-mixer-gives-error-no-available-audio-device starting to learn SDL, and want to add some audio to this "game" I am making for a school project. The audio won't play from my program, but the code for a tutorial I read and downloaded has audio in it and plays. I'm really confused on why my audio won't play, but here's what I KNOW isn't wrong. The mp3 is in the same folder as the code The mp3 plays http://stackoverflow.com/questions/37057745/sdl-mixer-audio-not-playing at 44100 Hz, just like Mixer expects it to. Any help is greatly appreciated, here is the code #include
02, 2014 2:16 pm When I run Code: Mix_OpenAudio( 44100, MIX_DEFAULT_FORMAT, 1, 2048 ) It returns a negative number. And Code: Mix_GetError() Doesn't seem to return anything at all. in Code: SDL_Log( could not "SDL_mixer could not initialize! SDL_mixer Error: %s\n", Mix_GetError() ); Does anyone know what I'm doing wrong? I'm using genymotion for emulating. Is it possible that that where my problems are? I don't seem to get any other could not initialize errors that anything's going wrong, other than that my wav file won't play.[/code] Trouble getting SDL2_mixer to work on android You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forum All times are GMT Page 1 of 1 All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 YearOldest FirstNewest First Select a forumSimple DirectMedia Layer----------------SDL AnnouncementsSDL JobsSDL DevelopmentGame Development SDL Forum Index » SDL Development Powered by phpBB © phpBB Group Design by Vjacheslav Trushkin for phpBBStyles.com. Content © SDL