Package quicktime.std.music

Source Code of quicktime.std.music.SynthesizerConnections

/*     */ package quicktime.std.music;
/*     */
/*     */ import java.io.IOException;
/*     */ import java.io.ObjectInputStream;
/*     */ import java.io.ObjectOutputStream;
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTObject;
/*     */ import quicktime.io.QTFile;
/*     */ import quicktime.util.EndianOrder;
/*     */ import quicktime.util.QTByteObject;
/*     */ import quicktime.util.QTPointer;
/*     */ import quicktime.util.QTUtils;
/*     */
/*     */ public class SynthesizerConnections extends QTByteObject
/*     */   implements Cloneable
/*     */ {
/*     */   public static final int kNativeSize = 32;
/*     */   private QTPointer spec;
/*     */   private static final long serialVersionUID = -2499879404792104283L;
/*     */
/*     */   public SynthesizerConnections()
/*     */   {
/*  41 */     this(32);
/*     */   }
/*     */
/*     */   public SynthesizerConnections(QTFile paramQTFile)
/*     */     throws QTException
/*     */   {
/*  50 */     this();
/*  51 */     setSoundBankFile(paramQTFile);
/*     */   }
/*     */
/*     */   protected SynthesizerConnections(int paramInt) {
/*  55 */     super(paramInt);
/*     */   }
/*     */   protected SynthesizerConnections(byte[] paramArrayOfByte) {
/*  58 */     super(paramArrayOfByte);
/*     */   }
/*     */
/*     */   private void readObject(ObjectInputStream paramObjectInputStream)
/*     */     throws IOException
/*     */   {
/*  69 */     int i = paramObjectInputStream.readInt();
/*  70 */     this.bytes = new byte[i];
/*  71 */     paramObjectInputStream.read(this.bytes);
/*     */
/*  73 */     for (int j = 0; j < 32; j += 4)
/*  74 */       setIntInArray(this.bytes, j, EndianOrder.flipBigEndianToNative32(getIntFromArray(this.bytes, j)));
/*     */   }
/*     */
/*     */   private void writeObject(ObjectOutputStream paramObjectOutputStream) throws IOException
/*     */   {
/*  79 */     byte[] arrayOfByte = getBytes();
/*     */
/*  81 */     int i = getSize();
/*  82 */     paramObjectOutputStream.writeInt(i);
/*     */
/*  84 */     for (int j = 0; j < 32; j += 2) {
/*  85 */       setIntInArray(arrayOfByte, j, EndianOrder.flipNativeToBigEndian32(getIntFromArray(getBytes(), j)));
/*     */     }
/*     */
/*  88 */     paramObjectOutputStream.write(arrayOfByte);
/*     */   }
/*     */
/*     */   public void setSoundBankFile(QTFile paramQTFile)
/*     */     throws QTException
/*     */   {
/*  98 */     byte[] arrayOfByte = paramQTFile.getFSSpec(true, 256);
/*  99 */     this.spec = new QTPointer(arrayOfByte);
/* 100 */     setIntAt(24, QTObject.ID(this.spec));
/*     */   }
/*     */
/*     */   public QTFile getSoundBankFile()
/*     */     throws QTException
/*     */   {
/* 110 */     return QTFile.fromSynthesizerConnections(this);
/*     */   }
/*     */
/*     */   public final int getClientID() {
/* 114 */     return getIntAt(0);
/*     */   }
/*     */   public final void setClientID(int paramInt) {
/* 117 */     setIntAt(0, paramInt);
/*     */   }
/*     */   public final int getInputID() {
/* 120 */     return getIntAt(8);
/*     */   }
/*     */   public final void setInputID(int paramInt) {
/* 123 */     setIntAt(8, paramInt);
/*     */   }
/*     */   public final int getOutputID() {
/* 126 */     return getIntAt(4);
/*     */   }
/*     */   public final void setOutputID(int paramInt) {
/* 129 */     setIntAt(4, paramInt);
/*     */   }
/*     */   public final int getMIDIChannel() {
/* 132 */     return getIntAt(12);
/*     */   }
/*     */   public final void setMIDIChannel(int paramInt) {
/* 135 */     setIntAt(12, paramInt);
/*     */   }
/*     */   public final int getFlags() {
/* 138 */     return getIntAt(16);
/*     */   }
/*     */   public final void setFlags(int paramInt) {
/* 141 */     setIntAt(16, paramInt);
/*     */   }
/*     */   public final int getUniqueID() {
/* 144 */     return getIntAt(20);
/*     */   }
/*     */   public final void setUniqueID(int paramInt) {
/* 147 */     setIntAt(20, paramInt);
/*     */   }
/*     */
/*     */   public String toString() {
/* 151 */     return getClass().getName() + "[flags=" + getFlags() + (getFlags() > 0 ? ",clientID=" + QTUtils.fromOSType(getClientID()) + ",inputID=" + QTUtils.fromOSType(getInputID()) + ",outputID=" + QTUtils.fromOSType(getOutputID()) + ",uniqueID=" + QTUtils.fromOSType(getUniqueID()) + "]" : "]") + "";
/*     */   }
/*     */
/*     */   public Object clone()
/*     */   {
/* 162 */     return new SynthesizerConnections(this.bytes);
/*     */   }
/*     */
/*     */   private static native short getShortFromArray(byte[] paramArrayOfByte, int paramInt);
/*     */
/*     */   private static native int getIntFromArray(byte[] paramArrayOfByte, int paramInt);
/*     */
/*     */   private static native void setShortInArray(byte[] paramArrayOfByte, int paramInt, short paramShort);
/*     */
/*     */   private static native void setIntInArray(byte[] paramArrayOfByte, int paramInt1, int paramInt2);
/*     */ }

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

Related Classes of quicktime.std.music.SynthesizerConnections

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.