Commit 39628506 authored by nanahira's avatar nanahira

add stb_vorbis for ogg support

parent 870b6b9d
...@@ -2,5 +2,7 @@ project "cminiaudio" ...@@ -2,5 +2,7 @@ project "cminiaudio"
kind "StaticLib" kind "StaticLib"
files { "*.c", "*.h" } files { "*.c", "*.h" }
forceincludes { "./stb_vorbis.h" }
filter "system:linux" filter "system:linux"
links { "dl", "pthread", "m" } links { "dl", "pthread", "m" }
This diff is collapsed.
This diff is collapsed.
...@@ -216,7 +216,7 @@ void SoundManager::PlayMusic(char* song, bool loop) { ...@@ -216,7 +216,7 @@ void SoundManager::PlayMusic(char* song, bool loop) {
BufferIO::DecodeUTF8(song, song_w); BufferIO::DecodeUTF8(song, song_w);
ma_sound_init_from_file_w(&engineMusic, song_w, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM); ma_sound_init_from_file_w(&engineMusic, song_w, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM);
#else #else
ma_sound_init_from_file(&engineMusic, song, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM); auto res = ma_sound_init_from_file(&engineMusic, song, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM);
#endif #endif
ma_sound_set_looping(&soundBGM, loop); ma_sound_set_looping(&soundBGM, loop);
ma_sound_start(&soundBGM); ma_sound_start(&soundBGM);
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "game.h" #include "game.h"
#include "../ocgcore/mtrandom.h" #include "../ocgcore/mtrandom.h"
#ifdef YGOPRO_USE_AUDIO #ifdef YGOPRO_USE_AUDIO
#define MINIAUDIO_IMPLEMENTATION
#include "miniaudio/miniaudio.h" #include "miniaudio/miniaudio.h"
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment