[vlc-devel] commit: do not throw VLCException in Audio (Filippo Carone )

git version control git at videolan.org
Sun Mar 9 12:39:23 CET 2008


vlc | branch: master | Filippo Carone <littlejohn at videolan.org> | Sun Mar  9 12:39:39 2008 +0100| [4add9fe38b3ef395be2deee5930bd0b6b0a7cd07]

do not throw VLCException in Audio

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4add9fe38b3ef395be2deee5930bd0b6b0a7cd07
---

 bindings/java/org/videolan/jvlc/Audio.java |   50 +++++++++++++++++++--------
 1 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/bindings/java/org/videolan/jvlc/Audio.java b/bindings/java/org/videolan/jvlc/Audio.java
index 9426dcb..09cf270 100644
--- a/bindings/java/org/videolan/jvlc/Audio.java
+++ b/bindings/java/org/videolan/jvlc/Audio.java
@@ -27,12 +27,6 @@
 
 package org.videolan.jvlc;
 
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
 import org.videolan.jvlc.internal.LibVlc.libvlc_exception_t;
 
 
@@ -41,60 +35,86 @@ public class Audio
 
     private final JVLC jvlc;
 
+    /**
+     * Constant for left channel audio
+     */
+    public static final int LEFT_CHANNEL = 3;
+
+    /**
+     * Constant for right channel audio
+     */
+    public static final int RIGHT_CHANNEL = 4;
+
+    /**
+     * Constant for reverse channel audio
+     */
+    public static final int REVERSE_CHANNEL = 2;
+
+    /**
+     * Constant for stereo channel audio
+     */
+    public static final int STEREO_CHANNEL = 1;
+
+    /**
+     * Constant for dolby channel audio
+     */
+    public final int DOLBY_CHANNEL = 5;
+
+    
     public Audio(JVLC jvlc)
     {
         this.jvlc = jvlc;
     }
 
-    public int getTrack(MediaInstance mediaInstance) throws VLCException
+    public int getTrack(MediaInstance mediaInstance)
     {
         libvlc_exception_t exception = new libvlc_exception_t();
         return jvlc.getLibvlc().libvlc_audio_get_track(mediaInstance.getInstance(), exception);
     }
 
-    public void setTrack(MediaInstance mediaInstance, int track) throws VLCException
+    public void setTrack(MediaInstance mediaInstance, int track)
     {
         libvlc_exception_t exception = new libvlc_exception_t();
         jvlc.getLibvlc().libvlc_audio_set_track(mediaInstance.getInstance(), track, exception);
     }
 
-    public int getChannel() throws VLCException
+    public int getChannel()
     {
         libvlc_exception_t exception = new libvlc_exception_t();
         return jvlc.getLibvlc().libvlc_audio_get_channel(jvlc.getInstance(), exception);
     }
 
-    public void setChannel(int channel) throws VLCException
+    public void setChannel(int channel)
     {
         libvlc_exception_t exception = new libvlc_exception_t();
         jvlc.getLibvlc().libvlc_audio_set_channel(jvlc.getInstance(), channel, exception);
     }
 
-    public boolean getMute() throws VLCException
+    public boolean getMute()
     {
         libvlc_exception_t exception = new libvlc_exception_t();
         return jvlc.getLibvlc().libvlc_audio_get_mute(jvlc.getInstance(), exception) == 1 ? true : false;
     }
 
-    public void setMute(boolean value) throws VLCException
+    public void setMute(boolean value)
     {
         libvlc_exception_t exception = new libvlc_exception_t();
         jvlc.getLibvlc().libvlc_audio_set_mute(jvlc.getInstance(), value ? 1 : 0, exception);
     }
 
-    public void toggleMute() throws VLCException
+    public void toggleMute()
     {
         libvlc_exception_t exception = new libvlc_exception_t();
         jvlc.getLibvlc().libvlc_audio_toggle_mute(jvlc.getInstance(), exception);
     }
 
-    public int getVolume() throws VLCException
+    public int getVolume()
     {
         libvlc_exception_t exception = new libvlc_exception_t();
         return jvlc.getLibvlc().libvlc_audio_get_volume(jvlc.getInstance(), exception);
     }
 
-    public void setVolume(int volume) throws VLCException
+    public void setVolume(int volume)
     {
         libvlc_exception_t exception = new libvlc_exception_t();
         jvlc.getLibvlc().libvlc_audio_set_volume(jvlc.getInstance(), volume, exception);




More information about the vlc-devel mailing list