Package com.apple.audio

Examples of com.apple.audio.CAException


/*     */
/*     */   public synchronized void addPropertyListener(int paramInt1, int paramInt2, AStreamPropertyListener paramAStreamPropertyListener)
/*     */     throws CAException
/*     */   {
/* 152 */     if (this.table.contains(paramInt2, paramAStreamPropertyListener, paramInt1)) {
/* 153 */       throw new CAException("Cannot add the same listener:" + paramAStreamPropertyListener + " to the same stream's property:" + Integer.toHexString(paramInt2) + " and channel:" + paramInt1);
/*     */     }
/* 155 */     HardwareDispatcher localHardwareDispatcher = new HardwareDispatcher(this, paramAStreamPropertyListener);
/* 156 */     int i = AudioStreamAddPropertyListener(_ID(), paramInt1, paramInt2, localHardwareDispatcher.ID(), 0);
/*     */
/* 161 */     if (i != 0) {
View Full Code Here


/*     */
/*     */   public synchronized void removePropertyListener(int paramInt1, int paramInt2, AStreamPropertyListener paramAStreamPropertyListener)
/*     */     throws CAException
/*     */   {
/* 178 */     if (!this.table.contains(paramInt2, paramAStreamPropertyListener, paramInt1)) {
/* 179 */       throw new CAException("Cannot remove the listener:" + paramAStreamPropertyListener + " on the stream's property:" + Integer.toHexString(paramInt2) + " and channel:" + paramInt1 + ". It hasn't been added");
/*     */     }
/* 181 */     HardwareDispatcher localHardwareDispatcher = this.table.remove(paramInt2, paramAStreamPropertyListener, paramInt1);
/* 182 */     removePropertyListener(paramInt1, paramInt2, paramAStreamPropertyListener, localHardwareDispatcher);
/*     */   }
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   protected synchronized void preDispose() throws CAException {
/*  74 */     if (this.doingConversion)
/*  75 */       throw new CAException("Can't dispose AudioConverter whilst it is converting");
/*  76 */     cleanup();
/*     */   }
View Full Code Here

/*     */   public int fillBuffer(AudioConverterDataSupplier paramAudioConverterDataSupplier, CAMemoryObject paramCAMemoryObject, int paramInt1, int paramInt2)
/*     */     throws CAException
/*     */   {
/* 213 */     if ((paramInt1 < 0) || (paramInt1 + paramInt2 > paramCAMemoryObject.getSize()))
/*     */     {
/* 215 */       throw new CAException(-50);
/* 216 */     }synchronized (this) {
/* 217 */       this.doingConversion = true;
/* 218 */       if (this.disp == null) {
/* 219 */         this.disp = new ATDispatcher(this, paramAudioConverterDataSupplier);
/*     */       }
View Full Code Here

/*     */   public int convertBuffer(CAMemoryObject paramCAMemoryObject1, int paramInt1, int paramInt2, CAMemoryObject paramCAMemoryObject2, int paramInt3, int paramInt4)
/*     */     throws CAException
/*     */   {
/* 255 */     if ((paramInt1 < 0) || (paramInt1 + paramInt2 > paramCAMemoryObject2.getSize()) || (paramInt3 < 0) || (paramInt3 + paramInt4 > paramCAMemoryObject2.getSize()))
/*     */     {
/* 259 */       throw new CAException(-50);
/*     */     }
/* 261 */     synchronized (this) {
/* 262 */       Accessor.setIntInPointer(this.convertObjPtr, 0, paramInt4);
/* 263 */       int i = AudioConverterConvertBuffer(_ID(), paramInt2, CAObject.ID(paramCAMemoryObject1) + paramInt1, this.convertObjPtr, CAObject.ID(paramCAMemoryObject2) + paramInt3);
/*     */
View Full Code Here

/*     */
/*     */   public void addPropertyListener(int paramInt, AUPropertyListener paramAUPropertyListener)
/*     */     throws CAException
/*     */   {
/* 798 */     if (paramAUPropertyListener == null) {
/* 799 */       throw new CAException("Must specifiy a listener to add");
/*     */     }
/* 801 */     if (this.idTable == null) {
/* 802 */       this.idTable = new Hashtable();
/*     */     }
/* 804 */     synchronized (this.idTable) {
/* 805 */       Integer localInteger = new Integer(paramInt);
/* 806 */       Object localObject1 = this.idTable.get(localInteger);
/* 807 */       if (localObject1 != null) {
/* 808 */         localObject2 = (Hashtable)localObject1;
/* 809 */         Object localObject3 = ((Hashtable)localObject2).get(paramAUPropertyListener);
/* 810 */         if (localObject3 != null)
/* 811 */           throw new CAException("Can't add same listener to same propertyID");
/*     */       }
/* 813 */       Object localObject2 = new AUDispatcher(this, paramAUPropertyListener);
/*     */
/* 815 */       int i = AudioUnitAddPropertyListener(_ID(), paramInt, ((AUDispatcher)localObject2).ID(), ((AUDispatcher)localObject2).refCon());
/* 816 */       if (i != 0) {
/* 817 */         ((AUDispatcher)localObject2).cleanup();
/* 818 */         throw new CAException(i);
/*     */       }
/*     */       Hashtable localHashtable;
/* 820 */       if (localObject1 == null) {
/* 821 */         localHashtable = new Hashtable();
/* 822 */         localHashtable.put(paramAUPropertyListener, localObject2);
View Full Code Here

/*     */
/*     */   public void removePropertyListener(int paramInt, AUPropertyListener paramAUPropertyListener)
/*     */     throws CAException
/*     */   {
/* 838 */     if (paramAUPropertyListener == null) {
/* 839 */       throw new CAException("Must specifiy a listener to remove");
/*     */     }
/* 841 */     synchronized (this.idTable) {
/* 842 */       Integer localInteger = new Integer(paramInt);
/* 843 */       Object localObject1 = this.idTable.get(localInteger);
/* 844 */       if (localObject1 == null)
View Full Code Here

/*    */   public int getNumberProperties() {
/* 41 */     return getIntAt(0);
/*    */   }
/*    */   public MIDIDeviceDBProperty getNthProperty(int paramInt) throws CAException {
/* 44 */     if ((paramInt < 0) || (paramInt >= getNumberProperties()))
/* 45 */       throw new CAException("MIDIDeviceDB::Range error:" + paramInt);
/* 46 */     return new MIDIDeviceDBProperty(_ID() + 4 + paramInt * 12);
/*    */   }
View Full Code Here

/*    */     throws CAException
/*    */   {
/* 33 */     int i = MIDIDeviceDBGetManufModelProperties(CAObject.ID(paramCAFString1), CAObject.ID(paramCAFString2));
/* 34 */     if (i != 0)
/* 35 */       return new MIDIDeviceDBPropertyList(i);
/* 36 */     throw new CAException("MIDIDeviceDB::No property list:GetManufModelProperties");
/*    */   }
View Full Code Here

/*    */     throws CAException
/*    */   {
/* 42 */     int i = MIDIDeviceDBGetManufacturers();
/* 43 */     if (i != 0)
/* 44 */       return new MIDIDeviceDBStringList(i);
/* 45 */     throw new CAException("MIDIDeviceDB::No property list:GetManufacturers");
/*    */   }
View Full Code Here

TOP

Related Classes of com.apple.audio.CAException

Copyright © 2018 www.massapicom. 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.