English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   support.WinUAE (https://eab.abime.net/forumdisplay.php?f=5)
-   -   low latency vsync sound issue (https://eab.abime.net/showthread.php?t=63881)

msayed1977 12 April 2012 14:37

low latency vsync sound issue
 
I have tried "Kick Off 2" without VSync, then I switched to 'Low latency VSync' during emulation.
When I switched to low latency vsync, I got a sound problem:
The sound frequency fluctuated to higher frequencies.
This bug is not very clear, and I think it happened because of the recent sound synchronization updates.
I hope you could fix it before the v2.41 final release.

Toni Wilen 12 April 2012 14:44

Quote:

Originally Posted by msayed1977 (Post 812136)
I have tried "Kick Off 2" without VSync, then I switched to 'Low latency VSync' during emulation.
When I switched to low latency vsync, I got a sound problem:
The sound frequency fluctuated to higher frequencies.
This bug is not very clear, and I think it happened because of the recent sound synchronization updates.
I hope you could fix it before the v2.41 final release.

But does it happen if you don't switch on the fly but start with vsync enabled. Thats the most important question! (EDIT: and of course without logs this is totally useless anyway)

msayed1977 12 April 2012 16:40

It really happened also when I started the emulator with Low Latency VSync.
I have attached the files.

Toni Wilen 12 April 2012 17:00

Quote:

Originally Posted by msayed1977 (Post 812157)
It really happened also when I started the emulator with Low Latency VSync.
I have attached the files.

winuaelog.txt is missing and does this really only happen in 2.4.1 betas? Just asking because sound sync changes shouldn't affect vsync. (You sure you aren't talking about normal 50Hz/60Hz pitch change which is normal)

msayed1977 13 April 2012 11:17

I cannot find winuaelog.txt file.
How can I get it?

Toni Wilen 13 April 2012 11:46

Quote:

Originally Posted by msayed1977 (Post 812342)
I cannot find winuaelog.txt file.
How can I get it?

It is only written if misc panel logging option is enabled. (include also logs from last working version for comparison)

msayed1977 13 April 2012 13:07

Here are the logs.
It is hard for me to find the last working version.

Toni Wilen 13 April 2012 13:17

Quote:

Originally Posted by msayed1977 (Post 812360)
Here are the logs.
It is hard for me to find the last working version.

It can't be. You are in wrong thread if 2.4.0 does the same! :)

Quote:

VSync remembered: 60.437325Hz/1.0=60.437325Hz. MinV=2 MaxV=600 Units=86178
60Hz = increased pitch is normal. It has always done the same in 60Hz vsync.

msayed1977 13 April 2012 14:15

It is really a bug since the beginning of the new VSync algorithm in version 2.33.
It is not a 50hz or 60hz related.
So, I will post it again to a separate thread.

Toni Wilen 13 April 2012 14:21

Post here (moved from beta thread)

msayed1977 13 April 2012 14:34

A pitch problem with new VSync algorithm
 
The sound pitch increases when enabling the new VSync algorithm first introduced in version 2.33.
This bug happened since the beginning of the new algorithm until the latest beta of WinUAE (version 2.41 beta 5).
It is not related to 50hz or 60hz VSync,
Here are the logs and configs.
I cannot give any further information.
Please fix soon (maybe in the new 2.41 betas).
I can tell you whether the new releases will work.

Toni Wilen 13 April 2012 21:25

I'd blame your sound card or driver and/or OS combination first because no one else has complained :) Also in most cases new vsync reduces or eliminates old vsync pitch issue.

Some tests:

What does SND% and CPU% show? (enable misc panel on screen leds). Does CPU% stay below 100%? Does SND% jump wildly and flash blue/red/yellow continuously?

Try 44100Hz instead of 48000Hz (some cards/drivers have only one "native" frequency, others use resampling)

Try double buffer and no-buffer modes. (Display panel)

adiq22 13 April 2012 23:28

1 Attachment(s)
+1 ;)

This issue was present in WinUAE 2.3.2 too. It's the reason why I don't use vsync.

P.S. To avoid tearing you may use Direct3D + Triple buffering + disabled vsync instead. No tearing, no sound distortion. Not sure about lag, but seems fine to me.

P.S.2. Another solution is to choose PortAudio driver but then I have to raise sound buffer in order to get clear sound.



EDIT. Looks like vsync don't work properly with sound drivers other than portaudio (at least not on WinXP), because framerate locks on 51-53 fps instead 50.

Toni Wilen 14 April 2012 07:21

Quote:

Originally Posted by adiq22 (Post 812484)
This issue was present in WinUAE 2.3.2 too. It's the reason why I don't use vsync.

You do know that low latency vsync (which works totally different and have totally different requirements than traditional vsync) was introduced in 2.3.3..

Old traditional vsync never worked 100% properly, it is only available because it may not be fully compatible with older systems.

msayed1977 14 April 2012 12:55

Most of the time, the CPU% is below 100%.
The SND% is stable and it is -42% most of the time.
No buffering and double buffering give the same problem.
Using 44100Hz gives the same problem.
I found another bug. In windowed mode with low latency VSync, the sound stutters (there is sound cuts). I will send this bug to a new thread.

msayed1977 14 April 2012 14:19

Important note:
My saved configs are NOT set to VSync.
You have to change to VSync before testing.

Toni Wilen 14 April 2012 14:26

Can you borrow some PCI sound card or something just for testing? I don't really trust those old onboard realteks.. (newer ones aren't that bad, usually)

More tests:

Download portaudio (available from winuae.net), unpack it to same directory as winuae.exe, select portaudio from sound panel, restart winuae, try all other sound drivers, do they work better than original directsound mode? Try also openal mode too.

Windowed mode issue is probably related, need to solve this first but note that I don't usuallyy care much about low latency vsync problems if hardware or drivers look suspicious :)

msayed1977 15 April 2012 01:34

I trust the PC drivers. If you find the problem unimportant, you can ignore it.

Toni Wilen 15 April 2012 11:08

I don't, I have learned drivers, especially older ones may not work so well with something that is not used by most normal programs and games, like accurate timing/sample position reporting when buffer size is small.

It may also be caused by powersaving bugs where QPF timer frequency changes randomly (WinUAE can use CPU 100% and then suddenly wait 1-2ms which can confuse some bad power saving features. This was quite common many years ago). For some reason this problem was much common with XP and older Windows versions.

Lots of variables and new vsync really requires exactly correctly behaving timers.

First task is to find what changes the behavior and only way to do is to remove variables one by one = do above tests carefully.

What is your exact mainboard name and model and CPU type?

msayed1977 15 April 2012 12:36

My GPU and sound drivers are updated.
I have a realtek onboard sound chip, and PixelView GeForce 8500GT video card.
The mainboard is Gigabyte S-series.
The processor is Core2 Due 2.66GHz.
I use Windows XP Pro SP3.
It is hard for me to give further information.


All times are GMT +2. The time now is 09:27.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.27671 seconds with 11 queries