Skip to content

AndroidSystem delegate doesn't check for null audio renderers #2397

@riccardobl

Description

@riccardobl

The AndroidSystem doesn't seem to have a way to allow to disable the audio renderer, see code below:

if (settings.getAudioRenderer().equals(AppSettings.ANDROID_MEDIAPLAYER)) {
audioRendererType = AppSettings.ANDROID_MEDIAPLAYER;
} else if (settings.getAudioRenderer().equals(AppSettings.ANDROID_OPENAL_SOFT)) {
audioRendererType = AppSettings.ANDROID_OPENAL_SOFT;
} else {
logger.log(Level.INFO, "AudioRenderer not set. Defaulting to OpenAL Soft");
audioRendererType = AppSettings.ANDROID_OPENAL_SOFT;
}

Setting audio renderer to null, as you would do with desktop, causes the engine to crash, due to the missing nullcheck.

Metadata

Metadata

Labels

AndroidbugSomething that is supposed to work, but doesn't. More severe than a "defect".diff:very-easy

Type

No type

Projects

Status

tracked

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions