summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/net/java/games/joal/util/WAVData.java20
-rw-r--r--src/java/net/java/games/joal/util/WAVLoader.java15
2 files changed, 23 insertions, 12 deletions
diff --git a/src/java/net/java/games/joal/util/WAVData.java b/src/java/net/java/games/joal/util/WAVData.java
index 5e484bf..9ab9e46 100644
--- a/src/java/net/java/games/joal/util/WAVData.java
+++ b/src/java/net/java/games/joal/util/WAVData.java
@@ -37,24 +37,32 @@ import java.nio.ByteBuffer;
/**
- * DOCUMENT ME!
+ * This class is a holder for WAV (.wav )file Data returned from the WavLoader
*
* @author Athomas Goldberg
*/
public final class WAVData {
- //DOCUMENT ME!
+ /** The audio data */
public final ByteBuffer data;
- //DOCUMENT ME!
+ /** the format of the Data. One of:
+ * <pre>
+ * AL.AL_FORMAT_MONO8
+ * AL.AL_FORMAT_MONO16
+ * AL.AL_FORMAT_STEREO8
+ * AL.AL_FORMAT_STEREO16
+ * </pre>
+ *
+ */
public final int format;
- //DOCUMENT ME!
+ /** Size (in bytes) of the data */
public final int size;
- //DOCUMENT ME!
+ /** The frequency of the data */
public final int freq;
- //DOCUMENT ME!
+ /** flag indicating whether or not the sound in the data should loop */
public final boolean loop;
WAVData(ByteBuffer data, int format, int size, int freq, boolean loop) {
diff --git a/src/java/net/java/games/joal/util/WAVLoader.java b/src/java/net/java/games/joal/util/WAVLoader.java
index 6d5e79e..4cb2836 100644
--- a/src/java/net/java/games/joal/util/WAVLoader.java
+++ b/src/java/net/java/games/joal/util/WAVLoader.java
@@ -49,7 +49,8 @@ import javax.sound.sampled.UnsupportedAudioFileException;
/**
- * DOCUMENT ME!
+ * A Loader utility for (.wav) files. Creates a WAVData object containing the
+ * data used by the AL.alBufferData method.
*
* @author Athomas Goldberg
*/
@@ -57,14 +58,16 @@ public class WAVLoader implements ALConstants {
private static final int BUFFER_SIZE = 128000;
/**
- * DOCUMENT ME!
+ * This method loads a (.wav) file into a WAVData object.
*
- * @param filename DOCUMENT ME!
+ * @param filename The name of the (.wav) file
*
- * @return DOCUMENT ME!
+ * @return a WAVData object containing the audio data
*
- * @throws UnsupportedAudioFileException DOCUMENT ME!
- * @throws IOException DOCUMENT ME!
+ * @throws UnsupportedAudioFileException if the format of the audio if not
+ * supported.
+ * @throws IOException If the file can no be found or some other IO error
+ * occurs
*/
public static WAVData loadFromFile(String filename)
throws UnsupportedAudioFileException, IOException {