Loading services/audiopolicy/managerdefault/AudioPolicyManager.cpp +5 −9 Original line number Diff line number Diff line Loading @@ -1058,12 +1058,12 @@ sp<IOProfile> AudioPolicyManager::getSpatializerOutputProfile( if (curProfile->getFlags() != AUDIO_OUTPUT_FLAG_SPATIALIZER) { continue; } if (!devices.empty()) { // reject profiles not corresponding to a device currently available DeviceVector supportedDevices = curProfile->getSupportedDevices(); if (!mAvailableOutputDevices.containsAtLeastOne(supportedDevices)) { continue; } if (!devices.empty()) { if (supportedDevices.getDevicesFromDeviceTypeAddrVec(devices).size() != devices.size()) { continue; Loading Loading @@ -5369,10 +5369,6 @@ bool AudioPolicyManager::canBeSpatializedInt(const audio_attributes_t *attr, } } // The caller can have the devices criteria ignored by passing and empty vector, and // getSpatializerOutputProfile() will ignore the devices when looking for a match. // Otherwise an output profile supporting a spatializer effect that can be routed // to the specified devices must exist. sp<IOProfile> profile = getSpatializerOutputProfile(config, devices); if (profile == nullptr) { Loading services/audiopolicy/managerdefault/AudioPolicyManager.h +12 −0 Original line number Diff line number Diff line Loading @@ -1099,6 +1099,18 @@ private: const audio_config_t *config, const AudioDeviceTypeAddrVector &devices) const; /** * @brief Gets an IOProfile for a spatializer output with the best match with * provided arguments. * The caller can have the devices criteria ignored by passing and empty vector, and * getSpatializerOutputProfile() will ignore the devices when looking for a match. * Otherwise an output profile supporting a spatializer effect that can be routed * to the specified devices must exist. * @param config audio configuration describing the audio format, channels, sample rate... * @param devices the sink audio device selected for playback * @return an IOProfile that canbe used to open a spatializer output. */ sp<IOProfile> getSpatializerOutputProfile(const audio_config_t *config, const AudioDeviceTypeAddrVector &devices) const; Loading Loading
services/audiopolicy/managerdefault/AudioPolicyManager.cpp +5 −9 Original line number Diff line number Diff line Loading @@ -1058,12 +1058,12 @@ sp<IOProfile> AudioPolicyManager::getSpatializerOutputProfile( if (curProfile->getFlags() != AUDIO_OUTPUT_FLAG_SPATIALIZER) { continue; } if (!devices.empty()) { // reject profiles not corresponding to a device currently available DeviceVector supportedDevices = curProfile->getSupportedDevices(); if (!mAvailableOutputDevices.containsAtLeastOne(supportedDevices)) { continue; } if (!devices.empty()) { if (supportedDevices.getDevicesFromDeviceTypeAddrVec(devices).size() != devices.size()) { continue; Loading Loading @@ -5369,10 +5369,6 @@ bool AudioPolicyManager::canBeSpatializedInt(const audio_attributes_t *attr, } } // The caller can have the devices criteria ignored by passing and empty vector, and // getSpatializerOutputProfile() will ignore the devices when looking for a match. // Otherwise an output profile supporting a spatializer effect that can be routed // to the specified devices must exist. sp<IOProfile> profile = getSpatializerOutputProfile(config, devices); if (profile == nullptr) { Loading
services/audiopolicy/managerdefault/AudioPolicyManager.h +12 −0 Original line number Diff line number Diff line Loading @@ -1099,6 +1099,18 @@ private: const audio_config_t *config, const AudioDeviceTypeAddrVector &devices) const; /** * @brief Gets an IOProfile for a spatializer output with the best match with * provided arguments. * The caller can have the devices criteria ignored by passing and empty vector, and * getSpatializerOutputProfile() will ignore the devices when looking for a match. * Otherwise an output profile supporting a spatializer effect that can be routed * to the specified devices must exist. * @param config audio configuration describing the audio format, channels, sample rate... * @param devices the sink audio device selected for playback * @return an IOProfile that canbe used to open a spatializer output. */ sp<IOProfile> getSpatializerOutputProfile(const audio_config_t *config, const AudioDeviceTypeAddrVector &devices) const; Loading