Package com.apple.audio

Examples of com.apple.audio.CAException


/*     */     throws CAException
/*     */   {
/* 215 */     synchronized (this.syncIOProc) {
/* 216 */       DeviceProcTable localDeviceProcTable = getDeviceProcTable();
/* 217 */       if (localDeviceProcTable.contains(paramAudioDeviceIOProc))
/* 218 */         throw new CAException("This ioProc is already registered as an IOProc for this device");
/* 219 */       HardwareDispatcher localHardwareDispatcher = new HardwareDispatcher(this, paramAudioDeviceIOProc, 1, 1);
/* 220 */       int i = AudioDeviceAddIOProc(_ID(), localHardwareDispatcher.ID(), 0);
/* 221 */       CAException.checkError(i);
/* 222 */       localDeviceProcTable.put(paramAudioDeviceIOProc, localHardwareDispatcher);
/*     */     }
View Full Code Here


/*     */   {
/* 232 */     synchronized (this.syncIOProc) {
/* 233 */       DeviceProcTable localDeviceProcTable = getDeviceProcTable();
/* 234 */       HardwareDispatcher localHardwareDispatcher = localDeviceProcTable.remove(paramAudioDeviceIOProc);
/* 235 */       if (localHardwareDispatcher == null)
/* 236 */         throw new CAException("This ioProc is not registered as an IOProc for this device");
/* 237 */       int i = removeIOProc(localHardwareDispatcher);
/* 238 */       CAException.checkError(i);
/*     */     }
/*     */   }
View Full Code Here

/* 265 */     synchronized (this.syncIOProc) {
/* 266 */       int i = 0;
/* 267 */       if (paramAudioDeviceIOProc != null) {
/* 268 */         HardwareDispatcher localHardwareDispatcher = getDeviceProcTable().get(paramAudioDeviceIOProc);
/* 269 */         if (localHardwareDispatcher == null)
/* 270 */           throw new CAException("You must first add this IOProc to this device");
/* 271 */         i = AudioDeviceStart(_ID(), localHardwareDispatcher.ID());
/*     */       } else {
/* 273 */         i = AudioDeviceStart(_ID(), 0);
/*     */       }
/* 275 */       CAException.checkError(i);
View Full Code Here

/* 298 */     synchronized (this.syncIOProc) {
/* 299 */       int i = 0;
/* 300 */       if (paramAudioDeviceIOProc != null) {
/* 301 */         HardwareDispatcher localHardwareDispatcher = getDeviceProcTable().get(paramAudioDeviceIOProc);
/* 302 */         if (localHardwareDispatcher == null)
/* 303 */           throw new CAException("You cannot stop a device's IOProc that is not added to the device.");
/* 304 */         i = _stop(localHardwareDispatcher);
/*     */       } else {
/* 306 */         i = _stop(null);
/*     */       }
/* 308 */       CAException.checkError(i);
View Full Code Here

/*     */     throws CAException
/*     */   {
/* 583 */     synchronized (this.syncInputListener) {
/* 584 */       DeviceProcTable localDeviceProcTable = getDeviceProcTable();
/* 585 */       if (localDeviceProcTable.containsInput(paramInt2, paramADevicePropertyListener, paramInt1)) {
/* 586 */         throw new CAException("Cannot add the same listener:" + paramADevicePropertyListener + " to the same device's input property:" + Integer.toHexString(paramInt2) + " and channel:" + paramInt1);
/*     */       }
/* 588 */       HardwareDispatcher localHardwareDispatcher = new HardwareDispatcher(this, paramADevicePropertyListener);
/* 589 */       int i = AudioDeviceAddPropertyListener(_ID(), paramInt1, (byte)1, paramInt2, localHardwareDispatcher.ID(), 0);
/* 590 */       if (i != 0) {
/* 591 */         localHardwareDispatcher.cleanup();
View Full Code Here

/*     */     throws CAException
/*     */   {
/* 607 */     synchronized (this.syncOutputListener) {
/* 608 */       DeviceProcTable localDeviceProcTable = getDeviceProcTable();
/* 609 */       if (localDeviceProcTable.containsOutput(paramInt2, paramADevicePropertyListener, paramInt1)) {
/* 610 */         throw new CAException("Cannot add the same listener:" + paramADevicePropertyListener + " to the same device's output property:" + Integer.toHexString(paramInt2) + " and channel:" + paramInt1);
/*     */       }
/* 612 */       HardwareDispatcher localHardwareDispatcher = new HardwareDispatcher(this, paramADevicePropertyListener);
/* 613 */       int i = AudioDeviceAddPropertyListener(_ID(), paramInt1, (byte)0, paramInt2, localHardwareDispatcher.ID(), 0);
/* 614 */       if (i != 0) {
/* 615 */         localHardwareDispatcher.cleanup();
View Full Code Here

/*     */     throws CAException
/*     */   {
/* 629 */     synchronized (this.syncInputListener) {
/* 630 */       DeviceProcTable localDeviceProcTable = getDeviceProcTable();
/* 631 */       if (!localDeviceProcTable.containsInput(paramInt2, paramADevicePropertyListener, paramInt1)) {
/* 632 */         throw new CAException("Cannot remove the listener:" + paramADevicePropertyListener + " on the device's input property:" + Integer.toHexString(paramInt2) + " and channel:" + paramInt1 + ". It hasn't been added");
/*     */       }
/* 634 */       HardwareDispatcher localHardwareDispatcher = localDeviceProcTable.removeInput(paramInt2, paramADevicePropertyListener, paramInt1);
/* 635 */       removePropertyListener(paramInt1, (byte)1, paramInt2, paramADevicePropertyListener, localHardwareDispatcher);
/*     */     }
/*     */   }
View Full Code Here

/*     */     throws CAException
/*     */   {
/* 645 */     synchronized (this.syncOutputListener) {
/* 646 */       DeviceProcTable localDeviceProcTable = getDeviceProcTable();
/* 647 */       if (!localDeviceProcTable.containsOutput(paramInt2, paramADevicePropertyListener, paramInt1)) {
/* 648 */         throw new CAException("Cannot remove the listener:" + paramADevicePropertyListener + " on the device's output property:" + Integer.toHexString(paramInt2) + " and channel:" + paramInt1 + ". It hasn't been added");
/*     */       }
/* 650 */       HardwareDispatcher localHardwareDispatcher = localDeviceProcTable.removeOutput(paramInt2, paramADevicePropertyListener, paramInt1);
/* 651 */       removePropertyListener(paramInt1, (byte)0, paramInt2, paramADevicePropertyListener, localHardwareDispatcher);
/*     */     }
/*     */   }
View Full Code Here

/*     */
/*     */   public void add(long paramLong, MIDIData paramMIDIData)
/*     */     throws CAException
/*     */   {
/* 134 */     if (this.readOnly) {
/* 135 */       throw new CAException("read only");
/*     */     }
/* 137 */     if (this.curPacket == 0) {
/* 138 */       init();
/*     */     }
/* 140 */     if (paramMIDIData.getMIDIDataLength() > 65536)
/* 141 */       throw new CAException("Can't add MIDIData with greater size than 65536");
/* 142 */     int i = MIDIPacketListAdd(_ID(), getSize(), this.curPacket, paramLong, paramMIDIData.getMIDIDataLength(), CAObject.ID(paramMIDIData) + paramMIDIData.getMIDIDataOffset());
/*     */
/* 148 */     if (i == 0) {
/* 149 */       throw new CAException("out of bounds");
/*     */     }
/* 151 */     this.curPacket = i;
/* 152 */     int j = numPackets();
/* 153 */     if (j > this.cachedMIDIPacketArray.length)
/* 154 */       resetPacketArray(j);
View Full Code Here

/*     */   public static MIDIDevice getExternalDevice(int paramInt)
/*     */     throws CAException
/*     */   {
/*  76 */     int i = MIDIGetExternalDevice(paramInt);
/*  77 */     if (i == 0)
/*  78 */       throw new CAException("Error in retreiving device at index=" + paramInt);
/*  79 */     return new MIDIDevice(i);
/*     */   }
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.