Package quicktime.std.music

Source Code of quicktime.std.music.AtomicInstrument

/*     */ package quicktime.std.music;
/*     */
/*     */ import com.apple.mrj.macos.carbon.CarbonAccess;
/*     */ import com.apple.mrj.macos.carbon.CarbonEventClient;
/*     */ import java.io.PrintStream;
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTObject;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.jdirect.QTNative;
/*     */ import quicktime.std.StdQTException;
/*     */ import quicktime.std.movies.AtomContainer;
/*     */ import quicktime.util.QTUtils;
/*     */
/*     */ public final class AtomicInstrument extends AtomContainer
/*     */ {
/*  30 */   private static boolean apriori = QTSession.apriori();
/*     */
/*  33 */   int res = 0;
/*     */
/*     */   public AtomicInstrument()
/*     */     throws QTException
/*     */   {
/*  43 */     super(allocate(), null, false);
/*     */   }
/*     */
/*     */   AtomicInstrument(int paramInt, Object paramObject) {
/*  47 */     super(paramInt, paramObject, false);
/*     */   }
/*     */
/*     */   private static int allocate() throws StdQTException
/*     */   {
/*  52 */     int[] arrayOfInt = { 0 };
/*  53 */     int i = QTNewAtomContainer(arrayOfInt);
/*  54 */     if (i != 0) throw new StdQTException(i);
/*  55 */     return arrayOfInt[0];
/*     */   }
/*     */
/*     */   public void pickEditInstrument(NoteAllocator paramNoteAllocator, String paramString, int paramInt)
/*     */     throws StdQTException
/*     */   {
/*  66 */     String str = paramString;
/*  67 */     NoteAllocator localNoteAllocator = paramNoteAllocator;
/*  68 */     int i = paramInt;
/*  69 */     int j = _ID();
/*  70 */     int k = 0;
/*  71 */     if (QTSession.isCurrentOS(4)) {
/*  72 */       System.out.println("New NAPickEditInstrument");
/*  73 */       k = ((Integer)CarbonAccess.invokeCarbonEventClient(new CarbonEventClient() { private final NoteAllocator val$n;
/*     */         private final String val$p;
/*     */         private final int val$i;
/*     */         private final int val$f;
/*     */
/*  75 */         public Object invoke() { int i = 0;
/*  76 */           i = AtomicInstrument.NAPickEditInstrument(QTObject.ID(this.val$n), 0, QTUtils.String2PString(this.val$p, 255), 0, 0, this.val$i, this.val$f);
/*     */
/*  78 */           return new Integer(i);
/*     */         }
/*     */       })).intValue();
/*     */
/*  81 */       StdQTException.checkError(k);
/*     */     } else {
/*  83 */       synchronized (QTNative.globalsLock) {
/*  84 */         StdQTException.checkError(NAPickEditInstrument(QTObject.ID(paramNoteAllocator), 0, QTUtils.String2PString(paramString, 255), 0, 0, _ID(), paramInt));
/*     */       }
/*     */     }
/*     */   }
/*     */
/*     */   public NoteChannel newNoteChannel(int paramInt)
/*     */     throws QTException
/*     */   {
/*  98 */     return newNoteChannel(NoteAllocator.getDefault(), paramInt);
/*     */   }
/*     */
/*     */   public NoteChannel newNoteChannel(NoteAllocator paramNoteAllocator, int paramInt)
/*     */     throws StdQTException
/*     */   {
/* 109 */     int[] arrayOfInt = new int[1];
/* 110 */     int i = NANewNoteChannelFromAtomicInstrument(QTObject.ID(paramNoteAllocator), lockAndDeref(0), paramInt, arrayOfInt);
/*     */
/* 112 */     if (!isLocked()) unlock();
/* 113 */     StdQTException.checkError(i);
/* 114 */     return new NoteChannel(paramNoteAllocator, arrayOfInt[0], null);
/*     */   }
/*     */
/*     */   int getPtr() {
/* 118 */     return lockAndDeref(0);
/*     */   }
/*     */
/*     */   private static native int NAPickEditInstrument(int paramInt1, int paramInt2, byte[] paramArrayOfByte, int paramInt3, int paramInt4, int paramInt5, int paramInt6);
/*     */
/*     */   private static native int NANewNoteChannelFromAtomicInstrument(int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt);
/*     */
/*     */   private static native short QTNewAtomContainer(int[] paramArrayOfInt);
/*     */ }

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

Related Classes of quicktime.std.music.AtomicInstrument

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.