CUzeBox - The new official Uzebox emulator
Re: CUzeBox - The new official Uzebox emulator
Hi, sorry I didn't have access to a Windows machine and only had spotty Internet. The only versions I tested on Windows were 2.0.4 and 2.0.12, which works with the patch I posted. If you need intermediate versions tested I can do that.
Re: CUzeBox - The new official Uzebox emulator
You mean the problem is present with SDL2 2.0.4? (That version shouldn't even have WASAPI, what else it defaults to then which is not directsound)
Re: CUzeBox - The new official Uzebox emulator
No, I tried compiling (unpatched) against the latest 2.0.12, and got no sound, then I tried compiling against 2.0.4 and it had sound, but my gamepad wasn't recognized. Then I searched "SDL 2.0.12 windows no sound" and discovered why and added the patch I posted in this thread.
I can try the versions in between without the patch to figure out what is the earliest version the patch is needed on, rather than just look at what version the other game emulators use as their min version for setting that environment variable. I can also swap the dlls around after I compile against a different version, just give me a heads up as to what you want me to test. (I have reliable Internet and access to a Windows machine now.)
I can try the versions in between without the patch to figure out what is the earliest version the patch is needed on, rather than just look at what version the other game emulators use as their min version for setting that environment variable. I can also swap the dlls around after I compile against a different version, just give me a heads up as to what you want me to test. (I have reliable Internet and access to a Windows machine now.)
Re: CUzeBox - The new official Uzebox emulator
I don't think it is necessary, WASAPI is introduced in SDL 2.0.6, so that should be the low bound of a version check.Artcfox wrote: ↑Mon Jul 06, 2020 7:27 pm No, I tried compiling (unpatched) against the latest 2.0.12, and got no sound, then I tried compiling against 2.0.4 and it had sound, but my gamepad wasn't recognized. Then I searched "SDL 2.0.12 windows no sound" and discovered why and added the patch I posted in this thread.
I can try the versions in between without the patch to figure out what is the earliest version the patch is needed on, rather than just look at what version the other game emulators use as their min version for setting that environment variable. I can also swap the dlls around after I compile against a different version, just give me a heads up as to what you want me to test. (I have reliable Internet and access to a Windows machine now.)
What I don't understand yet is why they aren't fixing this? Or why they didn't revert it if it is broken? They are seemingly keeping this defect in the library since 7 versions by now then.
Re: CUzeBox - The new official Uzebox emulator
Hey, anyone having Windows and experienced the broken sound issue, could you give this CUzeBox build a go with an SDL library version past 2.0.5? (The zip has an earlier SDL.dll in it, I just packed it the usual way for a binary release). Didn't commit it yet since I don't know the effect.
I tried to do something different after some research, this build should actually use WASAPI when WASAPI is available, and produce sound through it, at least if it works.
I tried to do something different after some research, this build should actually use WASAPI when WASAPI is available, and produce sound through it, at least if it works.
- Attachments
-
- cuzebox_windows_x86.zip
- CUzebox 20200724
- (416.54 KiB) Downloaded 547 times
-
- Posts: 1488
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: CUzeBox - The new official Uzebox emulator
Just tried it on Win7 and SDL2.dll 2.0.12 32bit and it works fine.
I had previously had sound issues but I don't have records to tell you what version of SDL2.dll I had at that time.
I had previously had sound issues but I don't have records to tell you what version of SDL2.dll I had at that time.
Re: CUzeBox - The new official Uzebox emulator
I'll give this a shot when I have access to a Windows machine.
Re: CUzeBox - The new official Uzebox emulator
I can confirm sound plays when run with the dll packaged, and when I swapped it with the newest sdl dll (2.0.12) sounds play, but right upon initial startup of cuzebox there are a couple loud popping noises, that sound almost like when you are plugging or unplugging a 3.5mm audio cable connected to powered speakers. This does not happen with the originally packaged sdl version, but consistently happens when swapped with the newer version.
Re: CUzeBox - The new official Uzebox emulator
Thank you! Within the emulator the startup is properly managed, avoiding such pops (properly starts at silent level). The change when you use a later than 2.0.5 SDL library on Windows is that it should use WASAPI, which was why the audio was totally broken the first place. So this seems to actually work with WASAPI, but something within SDL might be broken. Or within WASAPI itself. Or the combination of both along with Windows version... The situation is that, as I found, that Microsoft decided that audio from now is represented in floating point numbers only. The emulator is designed to pass 8 bit unsigned data, it is just the most reasonable as the PWM resolution is 8 bits either way, there is no point trying to improve it. So here I ended up asking SDL to make the sample conversion (while allowing it to choose frequency as the emulator can work with any host frequency). Maybe this conversion is broken somehow (in SDL, introducing latency with improper initialization). But I just don't want to go too far, the point of SDL would be exactly that the game shouldn't carry a huge luggage of platform specific code.Artcfox wrote: ↑Thu Aug 20, 2020 1:03 amI can confirm sound plays when run with the dll packaged, and when I swapped it with the newest sdl dll (2.0.12) sounds play, but right upon initial startup of cuzebox there are a couple loud popping noises, that sound almost like when you are plugging or unplugging a 3.5mm audio cable connected to powered speakers. This does not happen with the originally packaged sdl version, but consistently happens when swapped with the newer version.
Did you experince what Artcfox mentions on that setup?CunningFellow wrote: ↑Fri Jul 24, 2020 9:26 pmJust tried it on Win7 and SDL2.dll 2.0.12 32bit and it works fine.