diff --git a/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/StreamConfiguration.java b/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/StreamConfiguration.java index 1f3301e1c..5c1f32b75 100644 --- a/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/StreamConfiguration.java +++ b/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/StreamConfiguration.java @@ -591,6 +591,25 @@ public static String convertChannelMaskToText(int channelMask) { } } + static String convertRateConversionQualityToText(int quality) { + switch(quality) { + case RATE_CONVERSION_QUALITY_NONE: + return "None"; + case RATE_CONVERSION_QUALITY_FASTEST: + return "Fastest"; + case RATE_CONVERSION_QUALITY_LOW: + return "Low"; + case RATE_CONVERSION_QUALITY_MEDIUM: + return "Medium"; + case RATE_CONVERSION_QUALITY_HIGH: + return "High"; + case RATE_CONVERSION_QUALITY_BEST: + return "Best"; + default: + return "?=" + quality; + } + } + public static int convertTextToChannelMask(String text) { return mChannelMaskStringToIntegerMap.get(text); } diff --git a/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/TestDisconnectActivity.java b/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/TestDisconnectActivity.java index 9e4d880d2..b74c3b104 100644 --- a/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/TestDisconnectActivity.java +++ b/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/TestDisconnectActivity.java @@ -257,7 +257,8 @@ private String getConfigText(StreamConfiguration config) { + ", Perf = " + StreamConfiguration.convertPerformanceModeToText( config.getPerformanceMode()) + ", " + StreamConfiguration.convertSharingModeToText(config.getSharingMode()) - + ", " + config.getSampleRate(); + + ", " + config.getSampleRate() + + ", SRC = " + StreamConfiguration.convertRateConversionQualityToText(config.getRateConversionQuality()); } private void log(Exception e) { @@ -281,6 +282,7 @@ private void testConfiguration(boolean isInput, int perfMode, int sharingMode, int sampleRate, + int sampleRateConversionQuality, boolean requestPlugin) throws InterruptedException { if ((getSingleTestIndex() >= 0) && (mAutomatedTestRunner.getTestCount() != getSingleTestIndex())) { mAutomatedTestRunner.incrementTestCount(); @@ -334,8 +336,9 @@ private void testConfiguration(boolean isInput, requestedConfig.setPerformanceMode(perfMode); requestedConfig.setSharingMode(sharingMode); requestedConfig.setSampleRate(sampleRate); + if (sampleRate != 0) { - requestedConfig.setRateConversionQuality(StreamConfiguration.RATE_CONVERSION_QUALITY_MEDIUM); + requestedConfig.setRateConversionQuality(sampleRateConversionQuality); } log("========================== #" + mAutomatedTestRunner.getTestCount()); @@ -492,11 +495,20 @@ private void testConfiguration(boolean isInput, } private void testConfiguration(boolean isInput, int performanceMode, - int sharingMode, int sampleRate) throws InterruptedException { + int sharingMode, int sampleRate, + int sampleRateConversionQuality) throws InterruptedException { boolean requestPlugin = true; // plug IN - testConfiguration(isInput, performanceMode, sharingMode, sampleRate, requestPlugin); + testConfiguration(isInput, performanceMode, sharingMode, sampleRate, + sampleRateConversionQuality, requestPlugin); requestPlugin = false; // UNplug - testConfiguration(isInput, performanceMode, sharingMode, sampleRate, requestPlugin); + testConfiguration(isInput, performanceMode, sharingMode, sampleRate, + sampleRateConversionQuality, requestPlugin); + } + + private void testConfiguration(boolean isInput, int performanceMode, + int sharingMode, int sampleRate) throws InterruptedException { + testConfiguration(isInput, performanceMode, sharingMode, sampleRate, + StreamConfiguration.RATE_CONVERSION_QUALITY_NONE); } private void testConfiguration(boolean isInput, int performanceMode, @@ -512,9 +524,10 @@ private void testConfiguration(int performanceMode, } private void testConfiguration(int performanceMode, - int sharingMode, int sampleRate) throws InterruptedException { - testConfiguration(false, performanceMode, sharingMode, sampleRate); - testConfiguration(true, performanceMode, sharingMode, sampleRate); + int sharingMode, int sampleRate, + int sampleRateConversionQuality) throws InterruptedException { + testConfiguration(false, performanceMode, sharingMode, sampleRate, sampleRateConversionQuality); + testConfiguration(true, performanceMode, sharingMode, sampleRate, sampleRateConversionQuality); } @Override @@ -535,7 +548,11 @@ public void runTest() { testConfiguration(StreamConfiguration.PERFORMANCE_MODE_LOW_LATENCY, StreamConfiguration.SHARING_MODE_SHARED); testConfiguration(StreamConfiguration.PERFORMANCE_MODE_LOW_LATENCY, - StreamConfiguration.SHARING_MODE_SHARED, 44100); + StreamConfiguration.SHARING_MODE_SHARED, 44100, + StreamConfiguration.RATE_CONVERSION_QUALITY_NONE); + testConfiguration(StreamConfiguration.PERFORMANCE_MODE_LOW_LATENCY, + StreamConfiguration.SHARING_MODE_SHARED, 44100, + StreamConfiguration.RATE_CONVERSION_QUALITY_MEDIUM); } catch (InterruptedException e) { log("Test CANCELLED - INVALID!"); } catch (Exception e) {