Jump to content

Sound issues in Raine 0.92.6 and later versions


mer-curious

Recommended Posts

Hello Tux! It seems that sound output is broken after version 0.92.4. Apparently all versions after this are outputting sound in a lower quality.

I've noticed that in version 0.92.6 and later Raine introduced the option to change the sound driver and the default sample rate is not the standard for CD audio, which is 44100 I think, take a look:

B70kaxh.png

 

In version 0.92.4 (the last good one) we had this:

EOgReR5.png

How come have I only noticed this issue now after over a year of new releases?

I don't know exactly the answer. Recently I tested version 0.95 with my PS4 DS4 controller connected the first time I configured my Raine installation here and the program selected the DS4 sound as the first sound output. I noticed this because I was having no sound at all from the program and everything else in the system was working fine. Then I finally changed the sound driver option again to my default Realtek Audio speakers and realized the sound wasn't as good as before.

But why only now the sound became poor? That's something I'm still trying to figure out. The fact is that I didn't see any driver updates from Windows and my Realtek Audio driver is from December 2019.

Anyway, perhaps we could fix this by removing the "Sound driver" option in Raine? This would avoid it defaulting to unexpected audio output sources such as the DS4 controller or other modern controllers which also support audio output. We can easily select this audio source in the Windows taskbar if we want it, no?

Also, we need to make sure 44100 is the default sample rate otherwise the sound will be degraded.

Hopefully you will be able to reproduce this or help me understand what might have happened here.

Thank you so much again for your attention.

 

PS: the old versions page was really helpful in this case in which I had to go back and test old versions. I downloaded and tested every version released before the most recent one until I found the one working fine here. I could not only test version 0.93.4 because it complained about some missing files.

Link to comment
Share on other sites

No the sound driver won't go away, there are cases where it can be useful.

The reason why the frequency can change is that when the driver is changed raine asks if the driver has a preferred audio sample rate, and if there is one, it chooses it. It just means your ds4 prefers 11 KHz ! By the way 11kHz is not so bad if you stay on digital sounds, that is sound where devices use wav like sounds. It gets worse if generating sounds, for most "midi" music it becomes generated sound.

Anyway it's quite rare to have a sound driver with a preferred frequency, even more when this frequency is < 44100. For me here I have only one which has a preferred frequency, and it's 48 Khz !

You should just have paid more attention, but as I said the sound is not so bad in 11 KHz if you stay in some specific games, and by chance the kof games are in this category.

It's funny to see how people get attached to 44.1 Khz as a kind of grail these days. I learnt not too long ago that the "chromium tapes" we had been using in my childhood and which were considered top quality at the time, rendered sound at around 33 Khz only if I remember correctly, and we would never have guessed that at the time... !

Edited by Tux
Link to comment
Share on other sites

  • 1 month later...

Hello Tux!

I'm sorry for the late reply.

On 2/26/2023 at 4:32 AM, Tux said:

You should just have paid more attention, but as I said the sound is not so bad in 11 KHz if you stay in some specific games, and by chance the kof games are in this category.

I'm not sure if the difference was so little as you suggest, since I'm used to playing the KOF games and was able to notice the difference in the NEOGEO logo sound and clearly in the external audio tracks, which I mostly use to play these games.

Also, recently I connected my laptop computer to a TV through HDMI and Raine would not detect the TV's audio output as default, it would select the laptop's internal speakers which was quite strange since Windows' default audio output became the TV speakers. When we connect the laptop to the TV over HDMI the TV's speakers is automatically set as default by Windows, so I don't understand why Raine picked the laptop's internal speakers instead.

Anyway, since you want to keep this option because it can be useful in some cases, I would like to know if it would be possible to Raine detect Windows' current default audio output device and automatically select it by default instead of suggesting something else. I guess this would eliminate both the issue with the DS4 controller and the HDMI TV speakers I've experienced here (and possibly others too with other devices maybe).

I don't know if this could be doable, but that's my suggestion for now.

Thank you so much again for your attention.

Edited by mer-curious
Link to comment
Share on other sites

The audio device is saved as an index (a number then) in the config file, it's an index in the list of audio devices returned by sdl2, but there is no specific info about the order of the list, I guess it's just OS dependent. Usually the internal devices come 1st, then some eventual external devices (if it's like linux they are in the order in which they are detected, simply).

But anyway using this is relatively easy : plug a tv, if the sound can't be heard, open the audio options, search for the correct device, once the sound works if you quit normally the setting is saved and if nothing changes the next time you launch raine the sound will work on the external device from the start, I use it on a tv from time to time too (not too recently because I switched to a fan-less pc to experience some total silence while listening to music but this mini pc should have at least 1 more usb port, I should eventually try to connect an usb hub to work around that but for now I just use the tv, music and video functions, no games). But anyway when I used the normal tv, this setup worked without any problem, but in reality I used the tv only once for testing, then I returned to using the stereo for sound output !

I never tested with windows on a tv, but I don't think it changes its devices index at each reboot, it's not that bad, is it ? ;-)

Even microsoft recognizes their windows needs a modernization, they promised it for windows 12... ! Wait and see, if they are not eaten by the AI craziness before that !

Link to comment
Share on other sites

14 hours ago, Tux said:

The audio device is saved as an index (a number then) in the config file, it's an index in the list of audio devices returned by sdl2, but there is no specific info about the order of the list, I guess it's just OS dependent. Usually the internal devices come 1st, then some eventual external devices (if it's like linux they are in the order in which they are detected, simply).

Thank you for the explanation.

Interestingly I always do a new installation for every Raine release to avoid bugs and I had this issue with the DS4 audio output recently. Perhaps it was an update with SDL2?

Anyway, from what I understood it was supposed to get my normal audio output device in Windows since it had to be the first on the list, no? Or is the DS4 somehow taking priority in this list in Windows?

Another issue I've found is that even if you happen to know what the issue is with Raine and change the audio output device in the Sound Options, the sample rate is not adjusted accordingly, so the sound remains degraded, as you see in this capture:

https://drive.google.com/file/d/1065t11Awn0inl_37mD_QHezB5uhkB61T/view?usp=sharing

I understand nothing about audio sample rate, so I had to try the sound options until I found what was wrong and have the sound working correctly. Maybe the sample rate could be adjusted automatically too?

We should also consider that for someone new to the program this could be very hard to figure out. Also, it's not common for emulators to have such an option available. I've tested many of them here and couldn't find any that provide this option. In some you can change the audio driver, but never the audio output device. I suppose developers assume the user can change the output device in the OS if he/she wants that in the emulator, which is also I had always assumed.

But since you want to keep this option available for some use cases, I'd like to know if it wouldn't be possible to disable it just for the Windows builds then? Windows is a more popular OS and following the standard of other emulators out there may avoid users from accidentally facing this issue, as exactly as happened with me. Do you think this is a good idea?

That's it for my comments for now. Thank you so much again for your time.

Edited by mer-curious
Link to comment
Share on other sites

Ok you found a bug in the very 1st run when there is no config to read and the user call the sound options dialog before loading any game. In this case the sample rate is initialized to 11 Khz and it's a bug. There will be a workaround for this in next version, just force an early soundcard init when there is no sample rate to be sure to be able to ask the preferred sample rate to the device. Meanwhile next time you are doing a test without any config file, just avoid to call the sound options dialog before loading any game.

By the way this bug is here since Dec 27th 2021, so it's not new, but you had to call this specific dialog before loading any game and at the same time not having any config file to see it.

Edited by Tux
  • Like 1
Link to comment
Share on other sites

Hello Tux! That's really good news!

So now we may still have this issue of picking the "wrong" sound output device, but at least the sound will not be degraded anymore, right?

Hopefully no one will come across this issue until the next release.

I should give you my feedback when I try that in the next version

It was good in the end to always try a new config file to help finding unpredictable bugs.

Thank you again for your time and work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...