All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.sound.sampled.DataLine Maven / Gradle / Ivy

Go to download

JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.

There is a newer version: 0.6.8
Show newest version
package javax.sound.sampled;

@SuppressWarnings({"WeakerAccess", "unused"})
public interface DataLine extends Line {
	void drain();

	void flush();

	void start();

	void stop();

	boolean isRunning();

	boolean isActive();

	AudioFormat getFormat();

	int getBufferSize();

	int available();

	int getFramePosition();

	long getLongFramePosition();

	long getMicrosecondPosition();

	float getLevel();

	class Info extends Line.Info {

		private final AudioFormat[] formats;
		private final int minBufferSize;
		private final int maxBufferSize;

		public Info(Class lineClass, AudioFormat format, int bufferSize) {
			this(lineClass, new AudioFormat[]{format}, bufferSize, bufferSize);
		}

		public Info(Class lineClass, AudioFormat[] formats, int minBufferSize, int maxBufferSize) {
			super(lineClass);
			this.formats = formats;
			this.minBufferSize = minBufferSize;
			this.maxBufferSize = maxBufferSize;
		}

		public Info(Class lineClass, AudioFormat format) {
			this(lineClass, format, AudioSystem.NOT_SPECIFIED);
		}

		public AudioFormat[] getFormats() {
			return formats;
		}

		public boolean isFormatSupported(AudioFormat format) {
			return true;
		}

		public int getMinBufferSize() {
			return minBufferSize;
		}

		public int getMaxBufferSize() {
			return maxBufferSize;
		}

		public boolean matches(Line.Info info) {
			return true;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy