Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opensl: fix stream type for ringtone #1946

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/opensles/AudioOutputStreamOpenSLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
using namespace oboe;

static SLuint32 OpenSLES_convertOutputUsage(Usage oboeUsage) {
SLuint32 openslStream = SL_ANDROID_STREAM_MEDIA;
SLuint32 openslStream;
switch(oboeUsage) {
case Usage::Media:
case Usage::Game:
openslStream = SL_ANDROID_STREAM_MEDIA;
break;
case Usage::VoiceCommunication:
Expand All @@ -43,18 +44,15 @@ static SLuint32 OpenSLES_convertOutputUsage(Usage oboeUsage) {
openslStream = SL_ANDROID_STREAM_ALARM;
break;
case Usage::Notification:
case Usage::NotificationRingtone:
case Usage::NotificationEvent:
openslStream = SL_ANDROID_STREAM_NOTIFICATION;
break;
case Usage::NotificationRingtone:
openslStream = SL_ANDROID_STREAM_RING;
break;
case Usage::AssistanceAccessibility:
case Usage::AssistanceNavigationGuidance:
case Usage::AssistanceSonification:
philburk marked this conversation as resolved.
Show resolved Hide resolved
openslStream = SL_ANDROID_STREAM_SYSTEM;
break;
case Usage::Game:
openslStream = SL_ANDROID_STREAM_MEDIA;
break;
case Usage::Assistant:
default:
openslStream = SL_ANDROID_STREAM_SYSTEM;
Expand Down