Better OpenSLES backend implementation for Android

- Uses buffer values gleaned from Android system
    - Removes completely unnecessary playq and uses ringBuffer instead with read/write heads
    - ringBuffer includes a certain amount of "overflow" space for callback convenience
This commit is contained in:
Aaron Culliney
2015-07-02 22:24:14 -07:00
parent 0c6fe702e5
commit 2aba9a5ba1
3 changed files with 227 additions and 298 deletions
@@ -84,7 +84,7 @@ public final class DevicePropertyCalculator
SR_CHECK = am.getProperty( AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE );
}
final int defaultSampleRate = 44100;
final int defaultSampleRate = 22050;
return ( SR_CHECK != null ) ? Integer.parseInt( SR_CHECK ) : defaultSampleRate;
}