English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 12 April 2012, 14:37   #1
msayed1977
Better than the Original
 
msayed1977's Avatar
 
Join Date: May 2008
Location: Cairo, Egypt
Posts: 152
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.
msayed1977 is offline  
Old 12 April 2012, 14:44   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Quote:
Originally Posted by msayed1977 View Post
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)

Last edited by Toni Wilen; 12 April 2012 at 14:58.
Toni Wilen is offline  
Old 12 April 2012, 16:40   #3
msayed1977
Better than the Original
 
msayed1977's Avatar
 
Join Date: May 2008
Location: Cairo, Egypt
Posts: 152
It really happened also when I started the emulator with Low Latency VSync.
I have attached the files.

Last edited by msayed1977; 14 January 2013 at 17:30.
msayed1977 is offline  
Old 12 April 2012, 17:00   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Quote:
Originally Posted by msayed1977 View Post
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)
Toni Wilen is offline  
Old 13 April 2012, 11:17   #5
msayed1977
Better than the Original
 
msayed1977's Avatar
 
Join Date: May 2008
Location: Cairo, Egypt
Posts: 152
I cannot find winuaelog.txt file.
How can I get it?
msayed1977 is offline  
Old 13 April 2012, 11:46   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Quote:
Originally Posted by msayed1977 View Post
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)
Toni Wilen is offline  
Old 13 April 2012, 13:07   #7
msayed1977
Better than the Original
 
msayed1977's Avatar
 
Join Date: May 2008
Location: Cairo, Egypt
Posts: 152
Here are the logs.
It is hard for me to find the last working version.

Last edited by msayed1977; 14 January 2013 at 17:29.
msayed1977 is offline  
Old 13 April 2012, 13:17   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Quote:
Originally Posted by msayed1977 View Post
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.
Toni Wilen is offline  
Old 13 April 2012, 14:15   #9
msayed1977
Better than the Original
 
msayed1977's Avatar
 
Join Date: May 2008
Location: Cairo, Egypt
Posts: 152
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.
msayed1977 is offline  
Old 13 April 2012, 14:21   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Post here (moved from beta thread)
Toni Wilen is offline  
Old 13 April 2012, 14:34   #11
msayed1977
Better than the Original
 
msayed1977's Avatar
 
Join Date: May 2008
Location: Cairo, Egypt
Posts: 152
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.

Last edited by msayed1977; 14 January 2013 at 17:29.
msayed1977 is offline  
Old 13 April 2012, 21:25   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
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)
Toni Wilen is offline  
Old 13 April 2012, 23:28   #13
adiq22
Registered User
 
Join Date: Oct 2009
Location: Poland
Posts: 12
+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.
Attached Thumbnails
Click image for larger version

Name:	winuae 2012-04-13 23-51-28-93.jpg
Views:	385
Size:	119.6 KB
ID:	31253  

Last edited by adiq22; 13 April 2012 at 23:58.
adiq22 is offline  
Old 14 April 2012, 07:21   #14
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Quote:
Originally Posted by adiq22 View Post
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.
Toni Wilen is offline  
Old 14 April 2012, 12:55   #15
msayed1977
Better than the Original
 
msayed1977's Avatar
 
Join Date: May 2008
Location: Cairo, Egypt
Posts: 152
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 is offline  
Old 14 April 2012, 14:19   #16
msayed1977
Better than the Original
 
msayed1977's Avatar
 
Join Date: May 2008
Location: Cairo, Egypt
Posts: 152
Important note:
My saved configs are NOT set to VSync.
You have to change to VSync before testing.
msayed1977 is offline  
Old 14 April 2012, 14:26   #17
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
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
Toni Wilen is offline  
Old 15 April 2012, 01:34   #18
msayed1977
Better than the Original
 
msayed1977's Avatar
 
Join Date: May 2008
Location: Cairo, Egypt
Posts: 152
I trust the PC drivers. If you find the problem unimportant, you can ignore it.
msayed1977 is offline  
Old 15 April 2012, 11:08   #19
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
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?
Toni Wilen is offline  
Old 15 April 2012, 12:36   #20
msayed1977
Better than the Original
 
msayed1977's Avatar
 
Join Date: May 2008
Location: Cairo, Egypt
Posts: 152
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.
msayed1977 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Huge slowdown with low-latency vsync + no buffering + interlaced screen mark_k support.WinUAE 11 27 April 2012 21:30
Low latency v-sync setup Kernel support.WinUAE 4 23 April 2012 17:45
low latency vsync disappearing ? Foul support.WinUAE 0 15 April 2012 21:15
sound latency ancalimon support.WinUAE 4 05 July 2007 14:15
Lastest WinUAE = sound latency ??? Holicool support.WinUAE 6 01 June 2001 21:26

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:07.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11453 seconds with 14 queries