summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2021-03-15 11:31:45 -0700
committerAndy Hung <hunga@google.com>2021-03-15 11:50:06 -0700
commitfe4d13843a1e3682b34a0e1ca37853300f020849 (patch)
tree96e22ded92e641db13351840e80b9812c99e5f93 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent69237805b0ec787032626bae1fe4a5cb618240d2 (diff)
SoundPool: Improve single stream SoundPool handling
By design, the StreamManager ramps down volume on a Stream stop to prevent pops and glitches. When the SoundPool is configured only with a single stream, there may be a short period of unavailability of that stream while stop is called by the worker thread; an immediate play after a stop may return 0 (failure). To allow immediate play after stop for a *single* Stream configured SoundPool, we lock the StreamManager worker thread so that the stop call is processed and the stream is visible to the client for use. We prefer not to keep this lock for the multiple Stream case as it prevents concurrent initiation of sounds from multiple StreamManager worker threads and such blocking is not appropriate for games. Test: SoundPoolAacTest SoundPoolHapticTest Test: SoundPoolMidiTest SoundPoolOggTest Bug: 175097719 Bug: 177287876 Change-Id: Iec777d6319d5ed76000d4c5b12336b106dacede4
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions