From 325e5ed234a5e15f8f94eaa72dba6dbb619d490a Mon Sep 17 00:00:00 2001
From: Sven Gothel
+ * One {@link AudioFrame} may contain multiple pairs of samples per channel,
+ * i.e. this {@link AudioFrame} does not limit a frame to be one sample per channel.
+ * See its application in {@link AudioSink#enqueueData(int, ByteBuffer, int)}.
+ *
* Implementations may assign actual data to queue frames from streaming, see {@link AudioDataFrame}.
*
frameDuration < 1 ms
.
+ * Assumed as {@link #DefaultFrameDuration}, if frameDuration < 1 ms
.
* @param initialQueueSize initial time in milliseconds to queue in this sink, see {@link #DefaultInitialQueueSize}.
+ * May be used with `frameDuration` to determine initial {@link AudioFrame} buffer size.
* @param queueGrowAmount time in milliseconds to grow queue if full, see {@link #DefaultQueueGrowAmount}.
+ * May be used with `frameDuration` to determine {@link AudioFrame} buffer growth amount.
* @param queueLimit maximum time in milliseconds the queue can hold (and grow), see {@link #DefaultQueueLimitWithVideo} and {@link #DefaultQueueLimitAudioOnly}.
+ * May be used with `frameDuration` to determine {@link AudioFrame} buffer limit.
* @return true if successful, otherwise false
+ * @see #enqueueData(int, ByteBuffer, int)
*/
public boolean init(AudioFormat requestedFormat, int frameDuration,
int initialQueueSize, int queueGrowAmount, int queueLimit);
@@ -355,13 +366,15 @@ public interface AudioSink {
public int getFreeFrameCount();
/**
- * Enqueue byteCount
bytes of the remaining bytes of the given NIO {@link ByteBuffer} to this sink.
+ * Enqueue byteCount
bytes as a new {@link AudioFrame} to this sink.
* * The data must comply with the chosen {@link AudioFormat} as set via {@link #init(AudioFormat, float, int, int, int)}. *
** {@link #init(AudioFormat, float, int, int, int)} must be called first. *
+ * @param pts presentation time stamp for the newly enqueued {@link AudioFrame} + * @param bytes audio data for the newly enqueued {@link AudioFrame} * @returns the enqueued internal {@link AudioFrame}. * @see #init(AudioFormat, float, int, int, int) */ -- cgit v1.2.3