Package quicktime.sound

Source Code of quicktime.sound.ExtScheduledSoundHeader

/*     */ package quicktime.sound;
/*     */
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTObject;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.std.clocks.TimeRecord;
/*     */ import quicktime.util.QTPointerRef;
/*     */ import quicktime.util.QTUtils;
/*     */
/*     */ public final class ExtScheduledSoundHeader extends QTPointerRef
/*     */ {
/*  21 */   private static boolean apriori = QTSession.apriori();
/*     */   public static final int kNativeSize = 106;
/*     */   private QTPointerRef ref;
/*     */
/*     */   public ExtScheduledSoundHeader(QTPointerRef paramQTPointerRef, int paramInt1, float paramFloat, int paramInt2, int paramInt3)
/*     */     throws QTException
/*     */   {
/*  68 */     this(paramQTPointerRef, paramInt1, paramFloat, paramQTPointerRef.getSize() / paramInt1 / (paramInt2 / 8), paramInt2, paramInt3, 0, 0);
/*     */   }
/*     */
/*     */   public ExtScheduledSoundHeader(QTPointerRef paramQTPointerRef, int paramInt1, float paramFloat, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
/*     */     throws QTException
/*     */   {
/*  83 */     super(106, true);
/*  84 */     common_init();
/*  85 */     setSampleData(paramQTPointerRef);
/*  86 */     setNumChannels(paramInt1);
/*  87 */     setSampleRate(paramFloat);
/*  88 */     setNumFrames(paramInt2);
/*  89 */     setFormat(paramInt4);
/*  90 */     setSampleSize(paramInt3);
/*  91 */     setCompressionID(paramInt5);
/*  92 */     setPacketSize(paramInt6);
/*     */   }
/*     */
/*     */   public ExtScheduledSoundHeader(QTPointerRef paramQTPointerRef, int paramInt1, float paramFloat, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, TimeRecord paramTimeRecord, int paramInt7)
/*     */     throws QTException
/*     */   {
/* 109 */     super(106, true);
/* 110 */     common_init();
/* 111 */     setSampleData(paramQTPointerRef);
/* 112 */     setNumChannels(paramInt1);
/* 113 */     setSampleRate(paramFloat);
/* 114 */     setNumFrames(paramInt2);
/* 115 */     setFormat(paramInt4);
/* 116 */     setSampleSize(paramInt3);
/* 117 */     setCompressionID(paramInt5);
/* 118 */     setPacketSize(paramInt6);
/* 119 */     setStartTime(paramTimeRecord);
/* 120 */     setExtendedFlags(paramInt7);
/*     */   }
/*     */
/*     */   private void common_init() {
/* 124 */     this.ref = null;
/* 125 */     setByteAt(20, (byte)-2);
/* 126 */     setByteAt(21, (byte)60);
/*     */
/* 128 */     setIntAt(66, 4);
/* 129 */     setIntAt(94, 106);
/*     */   }
/*     */
/*     */   ExtScheduledSoundHeader(int paramInt, Object paramObject)
/*     */   {
/* 138 */     super(paramInt, 106, paramObject);
/*     */   }
/*     */
/*     */   public QTPointerRef getSampleData()
/*     */   {
/* 150 */     return this.ref;
/*     */   }
/*     */
/*     */   public void setSampleData(QTPointerRef paramQTPointerRef)
/*     */   {
/* 158 */     this.ref = paramQTPointerRef;
/* 159 */     setIntAt(0, QTObject.ID(paramQTPointerRef));
/* 160 */     setIntAt(102, paramQTPointerRef.getSize());
/*     */   }
/*     */
/*     */   public int getNumChannels()
/*     */   {
/* 168 */     return getIntAt(4);
/*     */   }
/*     */
/*     */   public void setNumChannels(int paramInt)
/*     */   {
/* 176 */     setIntAt(4, paramInt);
/*     */   }
/*     */
/*     */   public float getSampleRate()
/*     */   {
/* 184 */     return QTUtils.UFix2X(getIntAt(8));
/*     */   }
/*     */
/*     */   public void setSampleRate(float paramFloat)
/*     */   {
/* 192 */     setIntAt(8, QTUtils.X2UFix(paramFloat));
/*     */   }
/*     */
/*     */   public int getNumFrames()
/*     */   {
/* 199 */     return getIntAt(22);
/*     */   }
/*     */
/*     */   public void setNumFrames(int paramInt)
/*     */   {
/* 207 */     setIntAt(22, paramInt);
/*     */   }
/*     */
/*     */   public int getFormat()
/*     */   {
/* 214 */     return getIntAt(40);
/*     */   }
/*     */
/*     */   public void setFormat(int paramInt)
/*     */   {
/* 222 */     setIntAt(40, paramInt);
/*     */   }
/*     */
/*     */   public void setSampleSize(int paramInt)
/*     */   {
/* 230 */     setShortAt(62, (short)paramInt);
/*     */   }
/*     */
/*     */   public int getSampleSize()
/*     */   {
/* 237 */     return getShortAt(62);
/*     */   }
/*     */
/*     */   public int getCompressionID()
/*     */   {
/* 244 */     return getShortAt(56);
/*     */   }
/*     */
/*     */   public void setCompressionID(int paramInt)
/*     */   {
/* 252 */     setShortAt(56, (short)paramInt);
/*     */   }
/*     */
/*     */   public int getPacketSize()
/*     */   {
/* 259 */     return getShortAt(58);
/*     */   }
/*     */
/*     */   public void setPacketSize(int paramInt)
/*     */   {
/* 267 */     setShortAt(58, (short)paramInt);
/*     */   }
/*     */
/*     */   public TimeRecord getStartTime()
/*     */     throws QTException
/*     */   {
/* 274 */     return new TimeRecord(getIntAt(86), getLongAt(78));
/*     */   }
/*     */
/*     */   public void setStartTime(TimeRecord paramTimeRecord)
/*     */   {
/* 282 */     BlockMove(QTObject.ID(paramTimeRecord), _ID() + 78, 16);
/*     */   }
/*     */
/*     */   public int getExtendedFlags()
/*     */   {
/* 289 */     return getIntAt(98);
/*     */   }
/*     */
/*     */   public void setExtendedFlags(int paramInt)
/*     */   {
/* 296 */     setIntAt(98, paramInt);
/*     */   }
/*     */
/*     */   public String toString()
/*     */   {
/* 301 */     return getClass().getName() + "[" + "data:" + this.ref + ",numChannels:" + getNumChannels() + ",sampleRate:" + getSampleRate() + ",sampleSize:" + getSampleSize() + ",sampleFormat:" + QTUtils.fromOSType(getFormat()) + ",compressionID:" + getCompressionID() + "]";
/*     */   }
/*     */
/*     */   private static native void BlockMove(int paramInt1, int paramInt2, int paramInt3);
/*     */ }

/* Location:           Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name:     quicktime.sound.ExtScheduledSoundHeader
* JD-Core Version:    0.6.2
*/
TOP

Related Classes of quicktime.sound.ExtScheduledSoundHeader

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.