It is currently Fri Nov 17, 2017 11:41 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: A/V synchronization
PostPosted: Sun Jan 22, 2017 7:57 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
What are you using to record the output?

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
 Post subject: Re: A/V synchronization
PostPosted: Sun Jan 22, 2017 12:01 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5822
Location: Canada
The Windows WASAPI loopback from the speakers output. This:

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


Top
 Profile  
 
 Post subject: Re: A/V synchronization
PostPosted: Mon Jan 23, 2017 6:20 am 
Offline

Joined: Tue Jun 21, 2016 2:43 pm
Posts: 13
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
Top
 Profile  
 
 Post subject: Re: A/V synchronization
PostPosted: Mon Jan 23, 2017 6:51 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
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?

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
 Post subject: Re: A/V synchronization
PostPosted: Mon Jan 23, 2017 7:00 am 
Offline

Joined: Tue Jun 21, 2016 2:43 pm
Posts: 13
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.


Top
 Profile  
 
 Post subject: Re: A/V synchronization
PostPosted: Mon Jan 23, 2017 11:41 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
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.


Top
 Profile  
 
 Post subject: Re: A/V synchronization
PostPosted: Mon Jan 23, 2017 11:54 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
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.

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group