[libavg-devel] Audio Support Patch

Ulrich von Zadow uzadow at libavg.de
Wed Jan 2 21:56:38 CET 2008


Nick Hebner wrote:
> 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.

Yup - setFakeFPS should only be called when the player isn't running.

Cheers,

  Uli

-- 

Ulrich von Zadow | +49-172-7872715
Jabber: cocacoder at jabber.berlin.ccc.de
Skype: uzadow



More information about the libavg-devel mailing list