and AudioPolicyService::getOutputForEffect.
The conventional error value for audio_io_handle_t is 0,
not a status_t cast to audio_io_handle_t.
Change-Id: I34b3fd1a50f3fa1cbf39f32eea1911112a4e094a
audio_io_handle_t AudioSystem::getOutputForEffect(const effect_descriptor_t *desc)
{
const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
- if (aps == 0) return PERMISSION_DENIED;
+ // FIXME change return type to status_t, and return PERMISSION_DENIED here
+ if (aps == 0) return 0;
return aps->getOutputForEffect(desc);
}
audio_io_handle_t AudioPolicyService::getOutputForEffect(const effect_descriptor_t *desc)
{
+ // FIXME change return type to status_t, and return NO_INIT here
if (mpAudioPolicy == NULL) {
- return NO_INIT;
+ return 0;
}
Mutex::Autolock _l(mLock);
return mpAudioPolicy->get_output_for_effect(mpAudioPolicy, desc);