nesdev.com
http://forums.nesdev.com/

A/V synchronization
http://forums.nesdev.com/viewtopic.php?f=3&t=15405
Page 3 of 3

Author:  James [ Sun Jan 22, 2017 7:57 am ]
Post subject:  Re: A/V synchronization

What are you using to record the output?

Author:  rainwarrior [ Sun Jan 22, 2017 12:01 pm ]
Post subject:  Re: A/V synchronization

The Windows WASAPI loopback from the speakers output. This:

https://msdn.microsoft.com/en-us/library/windows/desktop/dd316551(v=vs.85).aspx

Author:  gdkchan [ Mon Jan 23, 2017 6:20 am ]
Post subject:  Re: A/V synchronization

Thanks for the help James! I just tested your example today, and the sound seems to be smooth most of the time, but I can hear some clicking after a few seconds. I just recorded the output of the program and this picture shows some changes on the shape of the wave:

Image

I noticed that when this happens the green line goes down too.

Edit:

Just exported this particular part as a Wave file.

Attachments:
square.zip [112.34 KiB]
Downloaded 20 times

Author:  James [ Mon Jan 23, 2017 6:51 am ]
Post subject:  Re: A/V synchronization

gdkchan wrote:
Thanks for the help James! I just tested your example today, and the sound seems to be smooth most of the time, but I can hear some clicking after a few seconds. I just recorded the output of the program and this picture shows some changes on the shape of the wave:

Image

I noticed that when this happens the green line goes down too.

Edit:

Just exported this particular part as a Wave file.

Clicking is indicative of a buffer underrun. Verify that your fps is at 60Hz and then try reducing the callback frequency by try changing wanted.samples to 1024.

What OS is this running under?

Author:  gdkchan [ Mon Jan 23, 2017 7:00 am ]
Post subject:  Re: A/V synchronization

James wrote:
Clicking is indicative of a buffer underrun. Verify that your fps is at 60Hz and then try reducing the callback frequency by try changing wanted.samples to 1024.


My display is configured to output @ 60Hz, and the application shows an average of 60fps (seems to fluctuate between 58 and 62). I'll try increasing the samples to 1024 and edit this post after I do.

James wrote:
What OS is this running under?

Windows 10.

Author:  koitsu [ Mon Jan 23, 2017 11:41 am ]
Post subject:  Re: A/V synchronization

The only "issue" with audio_sync.exe I can reproduce is when clicking the application window and/or dragging it around. Sometimes it doesn't re-synchronise, resulting in never-ending desynchronisation (clicking/stuttering), and the green gradually either decreases (i.e. keeps decreasing indefinitely) or increases and then decreases again indefinitely, etc.. and when I say never-ending, I do mean it -- I've left it running for a few minutes before. Framerate tends to vary a lot as well (in general though, not during the above), usually somewhere between 59 and 61. This is on Windows 7 SP1 x64.

If A/V evidence of this is needed, can provide, but won't be for a few days.

Author:  James [ Mon Jan 23, 2017 11:54 am ]
Post subject:  Re: A/V synchronization

koitsu wrote:
The only "issue" with audio_sync.exe I can reproduce is when clicking the application window and/or dragging it around. Sometimes it doesn't re-synchronise, resulting in never-ending desynchronisation (clicking/stuttering), and the green gradually either decreases (i.e. keeps decreasing indefinitely) or increases and then decreases again indefinitely, etc.. and when I say never-ending, I do mean it -- I've left it running for a few minutes before. Framerate tends to vary a lot as well (in general though, not during the above), usually somewhere between 59 and 61. This is on Windows 7 SP1 x64.

If A/V evidence of this is needed, can provide, but won't be for a few days.

Thanks for testing. This behavior is not expected per se, but not entirely surprising. nemulator contains code to detect this scenario and fix it. I stripped it out in an attempt to simplify the POC code; I'll add it back in.

Page 3 of 3 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/