Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YGOPRO-520DIY
ygopro
Commits
204c769a
Commit
204c769a
authored
Mar 28, 2025
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
787f78d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
gframe/sound_manager.cpp
gframe/sound_manager.cpp
+2
-8
premake/miniaudio/premake5.lua
premake/miniaudio/premake5.lua
+2
-1
premake5.lua
premake5.lua
+1
-0
No files found.
gframe/sound_manager.cpp
View file @
204c769a
#include "sound_manager.h"
#include "myfilesystem.h"
#if defined(YGOPRO_USE_MINIAUDIO) && defined(YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS)
#include <miniaudio_libvorbis.h>
#include <miniaudio_libopus.h>
#include <miniaudio_libvorbis.h>
#endif
#ifdef IRRKLANG_STATIC
#include "../ikpmp3/ikpMP3.h"
...
...
@@ -263,13 +263,7 @@ void SoundManager::PlayMusic(char* song, bool loop) {
StopBGM
();
#ifdef YGOPRO_USE_MINIAUDIO
strcpy
(
currentPlayingMusic
,
song
);
#ifdef _WIN32
wchar_t
song_w
[
1024
];
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
);
#else
auto
res
=
ma_sound_init_from_file
(
&
engineMusic
,
song
,
MA_SOUND_FLAG_ASYNC
|
MA_SOUND_FLAG_STREAM
,
nullptr
,
nullptr
,
&
soundBGM
);
#endif
ma_sound_init_from_file
(
&
engineMusic
,
song
,
MA_SOUND_FLAG_ASYNC
|
MA_SOUND_FLAG_STREAM
,
nullptr
,
nullptr
,
&
soundBGM
);
ma_sound_set_looping
(
&
soundBGM
,
loop
);
ma_sound_start
(
&
soundBGM
);
#endif
...
...
premake/miniaudio/premake5.lua
View file @
204c769a
...
...
@@ -117,7 +117,8 @@ project "miniaudio"
"external/opusfile/include"
,
"external/vorbis/include"
,
}
defines
{
"OPUS_BUILD"
,
"USE_ALLOCA"
,
defines
{
"OPUS_BUILD"
,
"USE_ALLOCA"
,
"OPUS_X86_PRESUME_SSE"
,
"OPUS_X86_PRESUME_SSE2"
,
"OPUS_HAVE_RTCD"
,
"OPUS_X86_MAY_HAVE_SSE"
,
"OPUS_X86_MAY_HAVE_SSE4_1"
,
"OPUS_X86_MAY_HAVE_AVX2"
,
}
...
...
premake5.lua
View file @
204c769a
...
...
@@ -12,6 +12,7 @@ USE_AUDIO = true
AUDIO_LIB
=
"miniaudio"
MINIAUDIO_SUPPORT_OPUS_VORBIS
=
true
MINIAUDIO_BUILD_OPUS_VORBIS
=
os
.
istarget
(
"windows"
)
IRRKLANG_PRO
=
false
IRRKLANG_PRO_BUILD_IKPMP3
=
false
-- read settings from command line or environment variables
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment