Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45faf7e0 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Use symbol AUDIO_DEVICE_NONE from <system/audio.h>

Change-Id: I61f882c5e7c949bf00d3bfc745ebf3b5e1c42a58
parent 1392eb3d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -739,7 +739,7 @@ uint32_t AudioSystem::getStrategyForStream(audio_stream_type_t stream)
audio_devices_t AudioSystem::getDevicesForStream(audio_stream_type_t stream)
{
    const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
    if (aps == 0) return (audio_devices_t)0;
    if (aps == 0) return AUDIO_DEVICE_NONE;
    return aps->getDevicesForStream(stream);
}

+2 −2
Original line number Diff line number Diff line
@@ -410,7 +410,7 @@ public:
                                         const audio_offload_info_t *offloadInfo)
    {
        Parcel data, reply;
        audio_devices_t devices = pDevices != NULL ? *pDevices : (audio_devices_t)0;
        audio_devices_t devices = pDevices != NULL ? *pDevices : AUDIO_DEVICE_NONE;
        uint32_t samplingRate = pSamplingRate != NULL ? *pSamplingRate : 0;
        audio_format_t format = pFormat != NULL ? *pFormat : AUDIO_FORMAT_DEFAULT;
        audio_channel_mask_t channelMask = pChannelMask != NULL ?
@@ -501,7 +501,7 @@ public:
                                        audio_channel_mask_t *pChannelMask)
    {
        Parcel data, reply;
        audio_devices_t devices = pDevices != NULL ? *pDevices : (audio_devices_t)0;
        audio_devices_t devices = pDevices != NULL ? *pDevices : AUDIO_DEVICE_NONE;
        uint32_t samplingRate = pSamplingRate != NULL ? *pSamplingRate : 0;
        audio_format_t format = pFormat != NULL ? *pFormat : AUDIO_FORMAT_DEFAULT;
        audio_channel_mask_t channelMask = pChannelMask != NULL ?
+2 −2
Original line number Diff line number Diff line
@@ -1561,7 +1561,7 @@ audio_io_handle_t AudioFlinger::openOutput(audio_module_handle_t module,
    ALOGV("openOutput(), offloadInfo %p version 0x%04x",
          offloadInfo, offloadInfo == NULL ? -1 : offloadInfo->version);

    if (pDevices == NULL || *pDevices == 0) {
    if (pDevices == NULL || *pDevices == AUDIO_DEVICE_NONE) {
        return 0;
    }

@@ -1775,7 +1775,7 @@ audio_io_handle_t AudioFlinger::openInput(audio_module_handle_t module,
    audio_format_t reqFormat = config.format;
    audio_channel_mask_t reqChannelMask = config.channel_mask;

    if (pDevices == NULL || *pDevices == 0) {
    if (pDevices == NULL || *pDevices == AUDIO_DEVICE_NONE) {
        return 0;
    }