diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2024-06-06 12:27:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-06 12:27:48 +0200 |
| commit | ca22d0af574376594395cf562c86fb60343fb4a9 (patch) | |
| tree | dff2b2563496dce450f97caa188bfa7ad6c114c8 /Source/Core/AudioCommon/OpenSLESStream.cpp | |
| parent | 47fae68b0fbcee37e59753ad3f8a3a49fd544cd8 (diff) | |
| parent | a3c23353c05c6455e47889dc5338fe6ee494d813 (diff) | |
Merge pull request #12833 from JosJuice/opensles-set-running
Android: Implement OpenSLESStream::SetRunning
Diffstat (limited to 'Source/Core/AudioCommon/OpenSLESStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/OpenSLESStream.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/AudioCommon/OpenSLESStream.cpp b/Source/Core/AudioCommon/OpenSLESStream.cpp index a35b981017..a3f6308187 100644 --- a/Source/Core/AudioCommon/OpenSLESStream.cpp +++ b/Source/Core/AudioCommon/OpenSLESStream.cpp @@ -137,6 +137,12 @@ OpenSLESStream::~OpenSLESStream() } } +bool OpenSLESStream::SetRunning(bool running) +{ + SLuint32 new_state = running ? SL_PLAYSTATE_PLAYING : SL_PLAYSTATE_PAUSED; + return (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, new_state) == SL_RESULT_SUCCESS; +} + void OpenSLESStream::SetVolume(int volume) { const SLmillibel attenuation = |
