if (rendererNode != null) {
final Renderer renderer = rendererNode.getRenderer();
if (renderer instanceof Clock)
{
final Clock rendererAsClock = (Clock) renderer;
try
{
TimeBase timeBase = rendererAsClock.getTimeBase();
// With JMF, this ends up as a com.sun.media.renderer.audio.AudioRenderer$AudioTimeBase@49bdc9d8
// TODO: what do we do in between getting and setting?
// probably what we need to do is somehow use this clock as our clock.
// TODO: this is starting to make sense to me. An audio renderer differs from a video renderer in that
// the audio renderer has to determine time, therefore it is the master clock. The video has to be synched with
// the audio, not the other way around.
rendererAsClock.setTimeBase(timeBase); // this seems unnecessary, but it does cause the audio renderer to set its master clock.
} catch (IncompatibleTimeBaseException e)
{
logger.log(Level.WARNING, "" + e, e);
postControllerErrorEvent("" + e);
return false;