mirror of
https://github.com/encounter/SDL.git
synced 2025-05-30 03:01:29 +00:00
Fixed bug #4982 - Failed to open audio_device on Android 5.x with freq 96khz+
This commit is contained in:
parent
495ee42a83
commit
b6d365677b
@ -47,6 +47,10 @@ public class SDLAudioManager
|
|||||||
if (desiredChannels > 2) {
|
if (desiredChannels > 2) {
|
||||||
desiredChannels = 2;
|
desiredChannels = 2;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AudioTrack has sample rate limitation of 48000 (fixed in 5.0.2) */
|
||||||
|
if (Build.VERSION.SDK_INT < 23) {
|
||||||
if (sampleRate < 8000) {
|
if (sampleRate < 8000) {
|
||||||
sampleRate = 8000;
|
sampleRate = 8000;
|
||||||
} else if (sampleRate > 48000) {
|
} else if (sampleRate > 48000) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user