Skip to content
Permalink
Browse files

Skip shared audio test if no input/output device available

  • Loading branch information...
bear101 committed Aug 1, 2019
1 parent e5c648d commit ab2b1d27b053fb9a222018226a1557b41d545c4d
Showing with 19 additions and 5 deletions.
  1. +19 −5 Library/TeamTalkJNI/test/dk/bearware/TeamTalkTestCase.java
@@ -1677,12 +1677,26 @@ public void test_SharedSoundDevice() {
int outputdeviceid = OUTPUTDEVICEID;

IntPtr indev = new IntPtr(), outdev = new IntPtr();
assertTrue("get default devs", ttclient1.getDefaultSoundDevices(indev, outdev));
boolean gotdevs = ttclient1.getDefaultSoundDevices(indev, outdev);
// cannot assert since test system might not have a sound input or output device.
//assertTrue("get default devs", ttclient1.getDefaultSoundDevices(indev, outdev));

if (inputdeviceid == -1)
inputdeviceid = indev.value;
if (outputdeviceid == -1)
outputdeviceid = outdev.value;
if (inputdeviceid == -1) {
if (gotdevs)
inputdeviceid = indev.value;
else {
System.err.println("Skipped shared audio test due to missing audio input device");
return;
}
}
if (outputdeviceid == -1) {
if (gotdevs)
outputdeviceid = outdev.value;
else {
System.err.println("Skipped shared audio test due to missing audio output device");
return;
}
}

SoundDevice shareddev = null;
Vector<SoundDevice> devs = new Vector<>();

0 comments on commit ab2b1d2

Please sign in to comment.
You can’t perform that action at this time.