No audio if enabled prior to video

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

Martin Pulec

  • Posts: 4
  • Joined: Mon May 02, 2016 11:32 am

No audio if enabled prior to video

PostTue Nov 01, 2016 2:28 pm

Hi all,

I am trying to do approximately following:
1) EnableAudioOutput
2) EnableVideoOutput
3) DisplayVideoFrameSync
4) WriteAudioSamplesSync

Steps 3 and 4 then repeat periodically, of course.

The problem I have is that if done so, audio output is not played. It only occurs when I capture from the same card from within another process, if not, it is OK. Also, if I swap steps 1 and 2 it is OK. The problem doesn't arise when using scheduled playback, only *Sync functions. Worth mentioning is that I use actually 2 threads - one for audio, one for video - however, it doesn't look like make any difference.

So there are basically 2 questions I have:
1) is mandatory to use order EnableVideoOutput and then EnableAudioOutput? It is suggested in SDK documentation (recommended steps to playback media), however I haven't seen it as a must.
2) are there any rules (ideally described somewhere) how to use the SDK from multiple threads? I mean, is it legitimate to have audio and video thread as I have or it just accidentally works and it may change in the future?


Thanks for any remarks!
Martin Pulec

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 30 guests