Urbi SDK Remote for Java  2.7.5
USound.java
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 2.0.4
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package urbi;
00010   /*---------.
00011   | USound.  |
00012   `---------*/
00013   /** Class encapsulating sound information.
00014 
00015    This class does not handle its memory: the data field must be
00016    freed manualy.  */
00017 
00018 public class USound {
00019   private long swigCPtr;
00020   protected boolean swigCMemOwn;
00021 
00022   public USound(long cPtr, boolean cMemoryOwn) {
00023     swigCMemOwn = cMemoryOwn;
00024     swigCPtr = cPtr;
00025   }
00026 
00027   public static long getCPtr(USound obj) {
00028     return (obj == null) ? 0 : obj.swigCPtr;
00029   }
00030 
00031   protected void finalize() {
00032     delete();
00033   }
00034 
00035   public synchronized void delete() {
00036     if (swigCPtr != 0) {
00037       if (swigCMemOwn) {
00038         swigCMemOwn = false;
00039         urbiJNI.delete_USound(swigCPtr);
00040       }
00041       swigCPtr = 0;
00042     }
00043   }
00044 
00045       /// Return an empty instance.
00046     /// Not a constructor so that we can still put it in a union.
00047  public  static USound make() {
00048     return new USound(urbiJNI.USound_make(), true);
00049   }
00050 
00051   public void init() {
00052     urbiJNI.USound_init(swigCPtr, this);
00053   }
00054 
00055       /// Return a legible definition of imageFormat.
00056  public  String format_string() {
00057     return urbiJNI.USound_format_string(swigCPtr, this);
00058   }
00059 
00060   public boolean isEqual(USound b) {
00061     return urbiJNI.USound_isEqual(swigCPtr, this, USound.getCPtr(b), b);
00062   }
00063 
00064   public void setSize(long value) {
00065     urbiJNI.USound_size_set(swigCPtr, this, value);
00066   }
00067 
00068   public long getSize() {
00069     return urbiJNI.USound_size_get(swigCPtr, this);
00070   }
00071 
00072   public void setChannels(long value) {
00073     urbiJNI.USound_channels_set(swigCPtr, this, value);
00074   }
00075 
00076   public long getChannels() {
00077     return urbiJNI.USound_channels_get(swigCPtr, this);
00078   }
00079 
00080   public void setRate(long value) {
00081     urbiJNI.USound_rate_set(swigCPtr, this, value);
00082   }
00083 
00084   public long getRate() {
00085     return urbiJNI.USound_rate_get(swigCPtr, this);
00086   }
00087 
00088   public void setSampleSize(long value) {
00089     urbiJNI.USound_sampleSize_set(swigCPtr, this, value);
00090   }
00091 
00092   public long getSampleSize() {
00093     return urbiJNI.USound_sampleSize_get(swigCPtr, this);
00094   }
00095 
00096   public void setSoundFormat(USoundFormat value) {
00097     urbiJNI.USound_soundFormat_set(swigCPtr, this, value.swigValue());
00098   }
00099 
00100   public USoundFormat getSoundFormat() {
00101     return USoundFormat.swigToEnum(urbiJNI.USound_soundFormat_get(swigCPtr, this));
00102   }
00103 
00104   public void setSampleFormat(USoundSampleFormat value) {
00105     urbiJNI.USound_sampleFormat_set(swigCPtr, this, value.swigValue());
00106   }
00107 
00108   public USoundSampleFormat getSampleFormat() {
00109     return USoundSampleFormat.swigToEnum(urbiJNI.USound_sampleFormat_get(swigCPtr, this));
00110   }
00111 
00112   public void setData(byte[] value) {
00113     urbiJNI.USound_data_set(swigCPtr, this, value);
00114   }
00115 
00116   public byte[] getData() {
00117   return urbiJNI.USound_data_get(swigCPtr, this);
00118 }
00119 
00120   public void deleteData() {
00121     urbiJNI.USound_deleteData(swigCPtr, this);
00122   }
00123 
00124   public USound() {
00125     this(urbiJNI.new_USound(), true);
00126   }
00127 
00128 }