/** * Copies {@code count} doubles from the memory pointed to by this * {@link DoublePtr} to {@code dst} starting at offset {@code offset}. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(double[] dst, int offset, int count) { asDoubleBuffer(count).get(dst, offset, count); }
/** * Copies {@code n} doubles from the memory pointed to by this {@link DoublePtr} * to a new {@code double[]} instance. * * @param n the number of doubles to copy. * @return the {@code double[]}. */ public double[] toDoubleArray(int n) { double[] result = new double[n]; get(result); return result; }
/** * Returns a {@link DoubleBuffer} which reads and writes to the same memory * location pointed to by this {@link DoublePtr}. * * @param n the maximum number of doubles the {@link DoubleBuffer} can * read/write. This will be the {@link DoubleBuffer}'s * <code>capacity</code>. * @return the {@link DoubleBuffer}. */ public DoubleBuffer asDoubleBuffer(int n) { return as(BytePtr.class).asByteBuffer(n << 3).order(ByteOrder.nativeOrder()).asDoubleBuffer(); }
/** * Creates a new {@link DoublePtr} and initializes it with the specified value. * * @param value the value. */ public DoublePtr(double value) { set(value); }
@Deprecated public static void setProperty(AudioSessionProperty id, double value) throws OSStatusException { setProperty(id, new DoublePtr(value)); } /**
public double[] getOutputDataAsDoubleArray() { DoublePtr ptr = getOutputDataPointer().as(DoublePtr.class); return ptr.toDoubleArray(getOutputDataSize()); } /*<members>*/
/** * Copies {@code dst.length} doubles from the memory pointed to by this * {@link DoublePtr} to {@code dst}. * * @param dst the destination. */ public void get(double[] dst) { get(dst, 0, dst.length); }
/** * Returns a {@link DoubleBuffer} which reads and writes to the same memory * location pointed to by this {@link DoublePtr}. * * @param n the maximum number of doubles the {@link DoubleBuffer} can * read/write. This will be the {@link DoubleBuffer}'s * <code>capacity</code>. * @return the {@link DoubleBuffer}. */ public DoubleBuffer asDoubleBuffer(int n) { return as(BytePtr.class).asByteBuffer(n << 3).order(ByteOrder.nativeOrder()).asDoubleBuffer(); }
/** * Copies {@code src.length} doubles from {@code src} to the memory pointed to by * this {@link DoublePtr}. * * @param src the source. */ public void set(double[] src) { set(src, 0, src.length); }
public void setProperty(ExtAudioFileProperty id, double value) throws OSStatusException { setProperty(id, new DoublePtr(value)); } /*<methods>*/
public double[] getOutputDataAsDoubleArray() { DoublePtr ptr = getOutputDataPointer().as(DoublePtr.class); return ptr.toDoubleArray(getOutputDataSize()); } /*<members>*/
public double getPropertyAsDouble(AUPropertyType type, AUScope scope) throws OSStatusException { DoublePtr ptr = getProperty(type, DoublePtr.class, scope); return ptr.get(); } public void setProperty(AUPropertyType type, int value, AUScope scope) throws OSStatusException {
/** * Copies {@code count} doubles from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link DoublePtr}. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(double[] src, int offset, int count) { asDoubleBuffer(count).put(src, offset, count); } }
/** * Returns a {@link DoubleBuffer} which reads and writes to the same memory * location pointed to by this {@link DoublePtr}. * * @param n the maximum number of doubles the {@link DoubleBuffer} can * read/write. This will be the {@link DoubleBuffer}'s * <code>capacity</code>. * @return the {@link DoubleBuffer}. */ public DoubleBuffer asDoubleBuffer(int n) { return as(BytePtr.class).asByteBuffer(n << 3).order(ByteOrder.nativeOrder()).asDoubleBuffer(); }
/** * Copies {@code src.length} doubles from {@code src} to the memory pointed to by * this {@link DoublePtr}. * * @param src the source. */ public void set(double[] src) { set(src, 0, src.length); }
public void setProperty(MusicTrackProperty id, double value) throws OSStatusException { setProperty(id, new DoublePtr(value)); } /**