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
050f1c94
Commit
050f1c94
authored
Mar 31, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix se uninit
parent
5a21ce9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
gframe/sound_manager.cpp
gframe/sound_manager.cpp
+7
-6
No files found.
gframe/sound_manager.cpp
View file @
050f1c94
...
@@ -93,14 +93,15 @@ void SoundManager::PlaySound(char* sound) {
...
@@ -93,14 +93,15 @@ void SoundManager::PlaySound(char* sound) {
#ifdef YGOPRO_USE_MINIAUDIO
#ifdef YGOPRO_USE_MINIAUDIO
StopSound
();
StopSound
();
SetSoundVolume
(
mainGame
->
gameConf
.
sound_volume
);
SetSoundVolume
(
mainGame
->
gameConf
.
sound_volume
);
playingSoundEffect
=
TRUE
;
#ifdef _WIN32
#ifdef _WIN32
wchar_t
sound_w
[
1024
];
wchar_t
sound_w
[
1024
];
BufferIO
::
DecodeUTF8
(
song
,
sound_w
);
BufferIO
::
DecodeUTF8
(
song
,
sound_w
);
ma_sound_init_from_file_w
(
&
engineSound
,
sound_w
,
MA_SOUND_FLAG_ASYNC
|
MA_SOUND_FLAG_STREAM
,
nullptr
,
nullptr
,
&
soundEffect
);
ma_sound_init_from_file_w
(
&
engineSound
,
sound_w
,
MA_SOUND_FLAG_ASYNC
|
MA_SOUND_FLAG_STREAM
,
nullptr
,
nullptr
,
&
soundEffect
);
#else
#else
ma_sound_init_from_file
(
&
engineSound
,
sound
,
MA_SOUND_FLAG_ASYNC
|
MA_SOUND_FLAG_STREAM
,
nullptr
,
nullptr
,
&
soundEffect
);
ma_sound_init_from_file
(
&
engineSound
,
sound
,
MA_SOUND_FLAG_ASYNC
|
MA_SOUND_FLAG_STREAM
,
nullptr
,
nullptr
,
&
soundEffect
);
#endif
#endif
ma_sound_start
(
&
soundEffect
);
ma_sound_start
(
&
soundEffect
);
#endif
#endif
#ifdef YGOPRO_USE_IRRKLANG
#ifdef YGOPRO_USE_IRRKLANG
SetSoundVolume
(
mainGame
->
gameConf
.
sound_volume
);
SetSoundVolume
(
mainGame
->
gameConf
.
sound_volume
);
...
@@ -368,7 +369,7 @@ void SoundManager::StopBGM() {
...
@@ -368,7 +369,7 @@ void SoundManager::StopBGM() {
}
}
void
SoundManager
::
StopSound
()
{
void
SoundManager
::
StopSound
()
{
#ifdef YGOPRO_USE_MINIAUDIO
#ifdef YGOPRO_USE_MINIAUDIO
if
(
!
playingSoundEffect
||
!
ma_sound_is_playing
(
&
soundEffect
)
)
if
(
!
playingSoundEffect
)
return
;
return
;
playingSoundEffect
=
FALSE
;
playingSoundEffect
=
FALSE
;
ma_sound_uninit
(
&
soundEffect
);
ma_sound_uninit
(
&
soundEffect
);
...
...
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