libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.1k stars 1.81k forks source link

MSVC/UWP - Cheevos unlock sound doesn't play when enabled #15028

Open retroNUC opened 1 year ago

retroNUC commented 1 year ago

Something I noticed when changing some things in code, works fine on MinGW builds.

Not gonna look into it myself, but logging here if anyone else wants to dive into the audio systems :)

retroNUC commented 1 year ago

Looks like it's https://github.com/libretro/RetroArch/issues/13833

Jamiras commented 1 year ago

The default unlock sound is an ogg file, which is not supported unless HAVE_STD_VORBIS is defined: https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/audio/audio_driver.c#L1011-L1013

The msvc2019 project does not define HAVE_STD_VORBIS. https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/pkg/msvc/msvc-2019/RetroArch-msvc2019.vcxproj#L1005

If you rename one of the other files (i.e. LAUNCH.wav => unlock.wav), then it'll work.

retroNUC commented 1 year ago

Even if we do want to enable it on MSVC, all these clips are short enough that we should probably just convert them to WAV anyway 🤷‍♂️

Should also do something about that legally questionable sound that currently sits in unlock.ogg at the same time...

GABO1423 commented 1 year ago

The default unlock sound is an ogg file, which is not supported unless HAVE_STD_VORBIS is defined:

https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/audio/audio_driver.c#L1011-L1013

The msvc2019 project does not define HAVE_STD_VORBIS.

https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/pkg/msvc/msvc-2019/RetroArch-msvc2019.vcxproj#L1005

If you rename one of the other files (i.e. LAUNCH.wav => unlock.wav), then it'll work.

It's not that simple. I tired adding that definition to the builds, and the sound effects still did not work. But I guess it wouldn't hurt to try again

Jamiras commented 1 year ago

I tired adding that definition to the builds, and the sound effects still did not work.

I admit that I did not actually try to change the build. I did verify that the existing build worked with an unlock.wav.

Did you have the sound enabled? https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/audio/audio_driver.c#L1346

When I tried debugging the issue, I noticed that the unlock sound was not found (path_cheevo_unlock == null).

https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/audio/audio_driver.c#L1428-L1429

I tracked that back to the fact the the file is only acknowledged if the extension is supported, and that ogg was not supported without HAVE_STD_VORBIS as mentioned above.

https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/audio/audio_driver.c#L1401-L1402 https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/audio/audio_driver.c#L1415-L1416

GABO1423 commented 1 year ago

I tired adding that definition to the builds, and the sound effects still did not work.

I admit that I did not actually try to change the build. I did verify that the existing build worked with an unlock.wav.

Did you have the sound enabled?

https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/audio/audio_driver.c#L1346

When I tried debugging the issue, I noticed that the unlock sound was not found (path_cheevo_unlock == null).

https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/audio/audio_driver.c#L1428-L1429

I tracked that back to the fact the the file is only acknowledged if the extension is supported, and that ogg was not supported without HAVE_STD_VORBIS as mentioned above.

https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/audio/audio_driver.c#L1401-L1402

https://github.com/libretro/RetroArch/blob/3bacd52629cb7e7acff833a8cbaf5ab9e2683b24/audio/audio_driver.c#L1415-L1416

I also have to admit I did not try the .wav file idea, good catch! And yeah, the setting was enabled. You've convinced me to try adding that definition and experimenting with this again. I'll get back with any findings soon

LibretroAdmin commented 1 year ago

Going to assume this can be closed now that the PR has been merged

retroNUC commented 1 year ago

PR states that it did not fix this issue.

GABO1423 commented 1 year ago

Going to assume this can be closed now that the PR has been merged

It wasn't fixed sadly, which is why I didn't make the PR close this issue unlike the DX12 regression one.

Screenshot_20230309-070345_Chrome

Rebourne07 commented 1 year ago

I believe this bug should be re-opened. It’s still an issue and has not been resolved. @LibretroAdmin

Rebourne07 commented 1 year ago

@retroNUC @Jamiras @GABO1423 Was any solution ever found for this? Any hope of it being fixed in any upcoming update? Thanks.

GABO1423 commented 1 year ago

Nothing, I even said above that this should be re-opened

retroNUC commented 1 year ago

If nobody wants to do the proper code fix, that's a free $100 for whoever wants to just convert the .ogg samples to .wav 🤷‍♂️

GABO1423 commented 1 year ago

If nobody wants to do the proper code fix, that's a free $100 for whoever wants to just convert the .ogg samples to .wav 🤷‍♂️

I tried playing wav files on the Xbox, and it didn't work sadly. So it isn't going to be that easy lad lol

Rebourne07 commented 1 year ago

Yeah, just today I tried using .wav, .mp3, .acc, .wmv...none worked. Tried using assets off the internal drive vs USB, didn't work either. This problem is deep. What I don't get is why the RGUI menu driver produces sound. What's it doing differently that the other menu drivers aren't doing? Sadly though, even though all other sounds work with RGUI...the unlock achievement sound still doesn't work with RGUI so there's some other issue on top of everything there.