]> git.sesse.net Git - vlc/blobdiff - bindings/java/core/src/test/java/org/videolan/jvlc/JVLCTest.java
jvlc: test to check audio mute on 2 different instances
[vlc] / bindings / java / core / src / test / java / org / videolan / jvlc / JVLCTest.java
index 23a3c99f079491ccaf01970f8c848091b8833019..ac6b31e5a8e86909663ca669ceb8fa40903fcf4b 100644 (file)
@@ -56,5 +56,37 @@ public class JVLCTest extends AbstractJVLCTest
         jvlc.release();
     }
     
-
+    @Test
+    public void jvlcMultipleInstances()
+    {
+        JVLC[] jvlcInstancesArray = new JVLC[10];
+        
+        for (int i = 0; i < jvlcInstancesArray.length; i++)
+        {
+            jvlcInstancesArray[i] = new JVLC();
+        }
+        for (int i = 0; i < jvlcInstancesArray.length; i++)
+        {
+            jvlcInstancesArray[i].release();
+        }
+        
+    }
+    
+    @Test
+    public void twoAudioInstancesTest() throws Exception
+    {
+        JVLC instance1 = new JVLC();
+        JVLC instance2 = new JVLC();
+        
+        instance1.play(mrl);
+        instance2.play(mrl);
+        
+        Thread.sleep(1000);
+        
+        instance1.getAudio().setMute(true);
+        Assert.assertNotNull(instance2.getAudio());
+        Assert.assertTrue(instance1.getAudio().getMute());
+        Assert.assertTrue(!instance2.getAudio().getMute());
+        
+    }
 }