Methods Summary |
---|
public void | close()
super.close();
|
protected com.sun.media.renderer.audio.device.AudioOutput | createDevice(javax.media.format.AudioFormat format)
return (new SunAudioOutput());
|
public long | getMediaNanoseconds()
if (useSystemTime) {
long t = clock.getMediaNanoseconds();
if (t - startMediaTime < DEVICE_LATENCY) {
return startMediaTime;
}
return t - DEVICE_LATENCY;
}
return super.getMediaNanoseconds();
|
public javax.media.Time | getMediaTime()
return (useSystemTime ? clock.getMediaTime() : super.getMediaTime());
|
public java.lang.String | getName()
return NAME;
|
public float | getRate()
return (useSystemTime ? clock.getRate() : super.getRate());
|
public javax.media.Time | getStopTime()
if (useSystemTime)
return clock.getStopTime();
else
return super.getStopTime();
|
public javax.media.Time | getSyncTime()
return (useSystemTime ? clock.getSyncTime() : super.getSyncTime());
|
public javax.media.TimeBase | getTimeBase()
return (useSystemTime ? clock.getTimeBase() : super.getTimeBase());
|
private static synchronized boolean | grabDevice()
/*
The following lines cause JMF to crash on the Mac.
Check to make sure we are not running on the Mac.
*/
if (runningOnMac) {
if (!sun.audio.AudioPlayer.player.isAlive()) {
System.out.println("Audio device is busy");
return false;
}
}
return true;
|
public javax.media.Time | mapToTimeBase(javax.media.Time t)
return (useSystemTime ? clock.mapToTimeBase(t) : super.mapToTimeBase(t));
|
public void | open()
if (!grabDevice()) {
throw new ResourceUnavailableException("AudioRenderer: Failed to initialize audio device.");
}
|
public void | setMediaTime(javax.media.Time now)
if (useSystemTime) {
clock.setMediaTime(now);
startMediaTime = now.getNanoseconds();
} else
super.setMediaTime(now);
|
public float | setRate(float factor)
// sun.audio does not support rate change.
return super.setRate(1.0f);
|
public void | setStopTime(javax.media.Time t)
if (useSystemTime)
clock.setStopTime(t);
else
super.setStopTime(t);
|
public void | setTimeBase(javax.media.TimeBase master)Specialized clock methods to use system timebase instead
of audio timebase for the mac.
if (useSystemTime) {
if (!(master instanceof SystemTimeBase)) {
Log.warning("AudioRenderer cannot be controlled by time bases other than its own: " + master);
/**
Silently allows the time base to be set to make
addController slightly more useful.
-ivg
throw new IncompatibleTimeBaseException();
*/
}
clock.setTimeBase(master);
} else {
super.setTimeBase(master);
}
|
public void | stop()
super.stop();
if (useSystemTime)
clock.stop();
|
public void | syncStart(javax.media.Time at)
super.syncStart(at);
if (useSystemTime)
clock.syncStart(at);
|