mirror of
https://github.com/libretro/libretro-chailove.git
synced 2024-11-27 02:01:00 +00:00
Fixes in SDL_Mixer
This commit is contained in:
parent
6285b85801
commit
174c2be736
5
Makefile
5
Makefile
@ -64,6 +64,7 @@ OBJECTS := libretro.o Application.o \
|
||||
chaigame/script.o \
|
||||
chaigame/filesystem.o \
|
||||
chaigame/image.o \
|
||||
chaigame/sound.o \
|
||||
chaigame/system.o \
|
||||
chaigame/src/ImageData.o \
|
||||
chaigame/src/Image.o \
|
||||
@ -78,11 +79,13 @@ else
|
||||
endif
|
||||
|
||||
LDFLAGS += $(fpic) $(SHARED) \
|
||||
vendor/sdl-libretro/libSDL_$(SDL_PREFIX).a \
|
||||
vendor/sdl-libretro/libSDL_gfx_$(SDL_PREFIX).a \
|
||||
vendor/sdl-libretro/SDL_image_$(SDL_PREFIX).a \
|
||||
vendor/sdl-libretro/libSDL_mixer_$(SDL_PREFIX).a \
|
||||
vendor/sdl-libretro/libSDL_$(SDL_PREFIX).a \
|
||||
vendor/physfs/libphysfs.a \
|
||||
-ldl -ljpeg -lpng \
|
||||
-lmikmod -lvorbisfile -logg \
|
||||
-lpthread $(EXTRA_LDF)
|
||||
FLAGS += -I. \
|
||||
-Ivendor/sdl-libretro/include \
|
||||
|
@ -1,11 +1,12 @@
|
||||
#include <SDL.h>
|
||||
//#include <SDL_mixer.h>
|
||||
#include <SDL_mixer.h>
|
||||
|
||||
|
||||
#include "sound.h"
|
||||
|
||||
namespace chaigame {
|
||||
bool sound::load() {
|
||||
/*int flags = MIX_INIT_OGG;// | MIX_INIT_MOD;
|
||||
int flags = MIX_INIT_OGG | MIX_INIT_MOD;
|
||||
int initted = Mix_Init(flags);
|
||||
if (initted&flags != flags) {
|
||||
printf("Mix_Init: Failed to init required ogg and mod support!\n");
|
||||
@ -16,11 +17,11 @@ namespace chaigame {
|
||||
if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 1024) == -1) {
|
||||
printf("Mix_OpenAudio: %s\n", Mix_GetError());
|
||||
return false;
|
||||
}*/
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool sound::unload() {
|
||||
//Mix_Quit();
|
||||
Mix_CloseAudio();
|
||||
Mix_Quit();
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
#define _SOUND_H_INCLUDED_
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_mixer.h>
|
||||
|
||||
namespace chaigame {
|
||||
class sound {
|
||||
|
Loading…
Reference in New Issue
Block a user