// Path: jalleg-binding/src/main/java/org/gillius/jalleg/binding/ALLEGRO_SAMPLE_ID.java
// public class ALLEGRO_SAMPLE_ID extends Structure {
// 	public int _index;
// 	public int _id;
// 	public ALLEGRO_SAMPLE_ID() {
// 		super();
// 		setAutoSynch(false);
// 	}
// 	protected List<? > getFieldOrder() {
// 		return Arrays.asList("_index", "_id");
// 	}
// 	public ALLEGRO_SAMPLE_ID(int _index, int _id) {
// 		super();
// 		this._index = _index;
// 		this._id = _id;
// 	}
// 	public ALLEGRO_SAMPLE_ID(Pointer peer) {
// 		super(peer);
// 	}
// 	public static class ByReference extends ALLEGRO_SAMPLE_ID implements Structure.ByReference {
// 		
// 	};
// 	public static class ByValue extends ALLEGRO_SAMPLE_ID implements Structure.ByValue {
// 		
// 	};
// }
// 
// Path: jalleg-binding/src/main/java/org/gillius/jalleg/binding/AllegroLibrary.java
// public static final float ALLEGRO_AUDIO_PAN_NONE = (float)(-1000.0f);
// 
// Path: jalleg-binding/src/main/java/org/gillius/jalleg/binding/AllegroLibrary.java
// public static native boolean al_play_sample(ALLEGRO_SAMPLE data, float gain, float pan, float speed, int loop, ALLEGRO_SAMPLE_ID ret_id);
// 
// Path: jalleg-binding/src/main/java/org/gillius/jalleg/binding/AllegroLibrary.java
// public static native void al_stop_sample(ALLEGRO_SAMPLE_ID spl_id);


import org.gillius.jalleg.binding.ALLEGRO_SAMPLE_ID;
import java.io.Closeable;
import java.io.IOException;
import static org.gillius.jalleg.binding.AllegroLibrary.ALLEGRO_AUDIO_PAN_NONE;
import static org.gillius.jalleg.binding.AllegroLibrary.ALLEGRO_PLAYMODE.ALLEGRO_PLAYMODE_LOOP;
import static org.gillius.jalleg.binding.AllegroLibrary.al_play_sample;
import static org.gillius.jalleg.binding.AllegroLibrary.al_stop_sample;
package org.gillius.jalleg.framework.audio;




/**
 * Plays looping sample data with al_play_sample until a specified time.
 */
public class LoopingSingleInstanceSample implements AutoCloseable {
	private final SampleData sampleData;
// Path: jalleg-binding/src/main/java/org/gillius/jalleg/binding/ALLEGRO_SAMPLE_ID.java
// public class ALLEGRO_SAMPLE_ID extends Structure {
// 	public int _index;
// 	public int _id;
// 	public ALLEGRO_SAMPLE_ID() {
// 		super();
// 		setAutoSynch(false);
// 	}
// 	protected List<? > getFieldOrder() {
// 		return Arrays.asList("_index", "_id");
// 	}
// 	public ALLEGRO_SAMPLE_ID(int _index, int _id) {
// 		super();
// 		this._index = _index;
// 		this._id = _id;
// 	}
// 	public ALLEGRO_SAMPLE_ID(Pointer peer) {
// 		super(peer);
// 	}
// 	public static class ByReference extends ALLEGRO_SAMPLE_ID implements Structure.ByReference {
// 		
// 	};
// 	public static class ByValue extends ALLEGRO_SAMPLE_ID implements Structure.ByValue {
// 		
// 	};
// }
// 
// Path: jalleg-binding/src/main/java/org/gillius/jalleg/binding/AllegroLibrary.java
// public static final float ALLEGRO_AUDIO_PAN_NONE = (float)(-1000.0f);
// 
// Path: jalleg-binding/src/main/java/org/gillius/jalleg/binding/AllegroLibrary.java
// public static native boolean al_play_sample(ALLEGRO_SAMPLE data, float gain, float pan, float speed, int loop, ALLEGRO_SAMPLE_ID ret_id);
// 
// Path: jalleg-binding/src/main/java/org/gillius/jalleg/binding/AllegroLibrary.java
// public static native void al_stop_sample(ALLEGRO_SAMPLE_ID spl_id);


// Path: jalleg-framework/src/main/java/org/gillius/jalleg/framework/audio/LoopingSingleInstanceSample.java
import org.gillius.jalleg.binding.ALLEGRO_SAMPLE_ID;
import java.io.Closeable;
import java.io.IOException;
import static org.gillius.jalleg.binding.AllegroLibrary.ALLEGRO_AUDIO_PAN_NONE;
import static org.gillius.jalleg.binding.AllegroLibrary.ALLEGRO_PLAYMODE.ALLEGRO_PLAYMODE_LOOP;
import static org.gillius.jalleg.binding.AllegroLibrary.al_play_sample;
import static org.gillius.jalleg.binding.AllegroLibrary.al_stop_sample;

package org.gillius.jalleg.framework.audio;




/**
 * Plays looping sample data with al_play_sample until a specified time.
 */
public class LoopingSingleInstanceSample implements AutoCloseable {
	private final SampleData sampleData;
	private final ALLEGRO_SAMPLE_ID id;