[libavg-devel] Audio Support Patch

Nick Hebner hebnern at gmail.com
Wed Jan 2 09:05:04 CET 2008


Tonight I whipped up some code to implement audio disabling when setFakeFPS
is called. To accomplish this, I simply added a setAudioEnabled(bool)
function to AudioEngine and AudioSource, and IVideoDecoder. When setFakeFPS
is called, it calls this on the player's AudioEngine accordingly.
Internally, the AudioEngine calls setAudioEnabled on each AudioSource. This
signals video nodes to make their video decoders sync to the system clock
instead of the audio clock.

The changes work correctly to implement the functionality, but the issue of
whether setFakeFPS can be called dynamically while the Player is playing
occurred to me. As it is, this property is not dynamically changable. If
fakeFPS is enabled while the Player is running, videos will lag for the
amount of time that has already been played back while the fake clock
catches up to the elapsed time, and then playback continues. With my
changes, there would be lag when fakeFPS is disabled because the audio clock
would have to catch up to the fake clock before new video frames are
displayed. Seeking the audio stream to the last video position when audio is
reenabled could correct this.

Since setFakeFPS is really only used for testing, it seems fine to me to
keep the non-dynamic nature of this property rather than adding code to
support functionality that will probably never be used. I just want to make
sure that this is agreed upon.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.datenhain.de/pipermail/libavg-devel/attachments/20080102/e19a7d4d/attachment.htm 


More information about the libavg-devel mailing list