How to use WriteAudioSamplesSync()

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Scott Kohnle

  • Posts: 3
  • Joined: Wed Apr 08, 2015 12:26 am

How to use WriteAudioSamplesSync()

PostWed Apr 08, 2015 12:32 am

Hello,

I am new to using the SDK and want to understand how to playback audio when the video is being played by my application via DisplayVideoFrameSync().

Can I use ScheduleAudioSamples() for audio at the same time as using DisplayVideoFrameSync for video? If not, how do I use WriteAudioSamplesSync()?

Thanks,
Scott.
Offline

Erwin Kloibhofer

  • Posts: 3
  • Joined: Wed Apr 15, 2015 4:52 pm

Re: How to use WriteAudioSamplesSync()

PostWed Apr 15, 2015 7:53 pm

Hello,

well, how exactly do you use DisplayVideoFrameSync()? How do you know it is time to send the next video-frame?

I would guess that every time you call DisplayVideoFrameSync() you also call WriteAudioSamplesSync() sending exactly the amount of audio-samples worth the "display-time" of one video-frame.

However, I am very curious how you manage to time DisplayVideoFrameSync()? I would have expected that there is some sort of "vertical-blank" signal coming from the Decklink, that can be used to time the whole process. But did not fine one so far.

Up until now I used StartScheduledPlayback() - but not only does that produce some type of lag, it also should not be used together with WriteAudioSamplesSync(). Wish there was a ScheduledFrameCompleted() callback, that works in "synchronous" mode.

I could not find any samples on this issue either. Some input would be highly appreciated!

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 12 guests