/* */ package quicktime.app.audio;
/* */
/* */ import quicktime.QTException;
/* */ import quicktime.QTRuntimeException;
/* */ import quicktime.QTSession;
/* */ import quicktime.std.movies.Track;
/* */ import quicktime.std.movies.media.AudioMediaHandler;
/* */ import quicktime.std.movies.media.Media;
/* */
/* */ /** @deprecated */
/* */ public class AudioMediaControl
/* */ implements ExtendedAudioSpec
/* */ {
/* */ protected Media audioMedia;
/* */ protected AudioMediaHandler audioHandler;
/* */ private boolean muted;
/* */
/* */ /** @deprecated */
/* */ public AudioMediaControl(Media paramMedia)
/* */ throws QTException
/* */ {
/* 24 */ this(paramMedia, (AudioMediaHandler)paramMedia.getHandler());
/* */ }
/* */
/* */ private AudioMediaControl(Media paramMedia, AudioMediaHandler paramAudioMediaHandler) throws QTException {
/* 28 */ this.audioMedia = paramMedia;
/* 29 */ this.audioHandler = paramAudioMediaHandler;
/* 30 */ this.muted = (this.audioMedia.getTrack().getVolume() < 0.0F);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Media getMedia()
/* */ {
/* 46 */ return this.audioMedia;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public boolean isMuted()
/* */ {
/* 53 */ return this.muted;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setMuted(boolean paramBoolean)
/* */ throws QTException
/* */ {
/* 61 */ float f = this.audioMedia.getTrack().getVolume();
/* 62 */ if (paramBoolean != this.muted) {
/* 63 */ this.audioMedia.getTrack().setVolume(-f);
/* 64 */ this.muted = paramBoolean;
/* */ }
/* */ }
/* */
/* */ /** @deprecated */
/* */ public float getVolume()
/* */ throws QTException
/* */ {
/* 73 */ float f = this.audioMedia.getTrack().getVolume();
/* 74 */ return Math.abs(f);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setVolume(float paramFloat)
/* */ throws QTException
/* */ {
/* 82 */ if (paramFloat < 0.0F)
/* 83 */ throw new QTException("Illegal volume");
/* 84 */ if (false == this.muted)
/* 85 */ this.audioMedia.getTrack().setVolume(paramFloat);
/* */ else
/* 87 */ this.audioMedia.getTrack().setVolume(-paramFloat);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public float getBalance()
/* */ throws QTException
/* */ {
/* 96 */ return this.audioHandler.getBalance();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setBalance(float paramFloat)
/* */ throws QTException
/* */ {
/* 105 */ this.audioHandler.setBalance(paramFloat);
/* */ }
/* */
/* */ static
/* */ {
/* 12 */ if ((QTSession.isCurrentOS(4)) && (QTSession.getJavaVersion() >= 65540))
/* 13 */ throw new QTRuntimeException("Unsupported on Mac OS X and Java 1.4 and higher.");
/* */ }
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.app.audio.AudioMediaControl
* JD-Core Version: 0.6.2
*/