LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-30-2011, 09:43 AM   #1
Hidden Windshield
Member
 
Registered: Jul 2010
Distribution: Fedora
Posts: 68

Rep: Reputation: 27
Synchronizing PortAudio sound with GUI


I'm writing an application that uses PortAudio to generate sound. I need to synchronize certain GUI changes with the sound stream. The callback function receives a struct PaStreamCallbackTimeInfo that seems to have the timing information I need, but there's no documentation on what the various fields mean. Through experimentation, I've found that the currentTime field is the time that the callback was called (in retrospect, that seems pretty obvious), but what do the inputBufferAdcTime and outputBufferDacTime fields mean?

(Actually, PortAudio calls the callback fast enough that I could just use the currentTime to get the synchronization close enough, but still... it's the principle of the thing.)
 
Old 05-01-2011, 03:36 PM   #2
Hidden Windshield
Member
 
Registered: Jul 2010
Distribution: Fedora
Posts: 68

Original Poster
Rep: Reputation: 27
Never mind

As I was working on another part of my project, I just happened to stumble across the answer. Oh well.

For those of you interested, this page says that inputBufferAdcTime is the time that the first sample of the input buffer was received, and outputBufferDacTime is the time that the first sample of the output buffer will be sent.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Synchronizing 2 servers bucovaina78 Linux - Server 4 09-07-2010 05:20 AM
PortAudio makes no sound TheSergon13 Linux - Software 0 04-28-2010 09:24 AM
synchronizing a centos repository nayabingi Linux - Software 2 03-20-2008 12:44 PM
Synchronizing folders aenahel Linux - Server 4 06-15-2007 10:52 PM
Synchronizing time depam Linux - Software 2 10-10-2005 06:11 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration