diff java/src/com/aurellem/send/AudioSend.java @ 13:92b416b4e027

fixed all problems for 16 bit mono output
author Robert McIntyre <rlm@mit.edu>
date Mon, 31 Oct 2011 07:44:02 -0700
parents 37f25cb34196
children 22ac5a0367cd
line wrap: on
line diff
     1.1 --- a/java/src/com/aurellem/send/AudioSend.java	Mon Oct 31 03:33:37 2011 -0700
     1.2 +++ b/java/src/com/aurellem/send/AudioSend.java	Mon Oct 31 07:44:02 2011 -0700
     1.3 @@ -2,6 +2,8 @@
     1.4  
     1.5  import java.nio.ByteBuffer;
     1.6  
     1.7 +import javax.sound.sampled.AudioFormat;
     1.8 +
     1.9  public class AudioSend {
    1.10  
    1.11  	private final long deviceID;
    1.12 @@ -75,4 +77,15 @@
    1.13  		nsetNthListenerf(pname, v1, this.deviceID, contextNum);}
    1.14  	public static native void nsetNthListenerf(int pname, float v1, long device, int contextNum);
    1.15  	
    1.16 +	
    1.17 +	/**
    1.18 +	 * Retrieve the AudioFormat which the device is using.  This format is itself derived
    1.19 +	 * from the OpenAL config file under the "format" variable.
    1.20 +	 */
    1.21 +	public AudioFormat getAudioFormat(){
    1.22 +		return ngetAudioFormat(this.deviceID);}
    1.23 +	public static native AudioFormat ngetAudioFormat(long device);
    1.24 +	
    1.25 +	
    1.26 +	
    1.27  }