mDirection = CAudioInfo::EAudioDirection::AUDIO_DIRECTION_OUT;
}
+ //LCOV_EXCL_START
CAudioOutput::CAudioOutput(
unsigned int sampleRate,
CAudioInfo::EChannel channel,
mDirection = CAudioInfo::EAudioDirection::AUDIO_DIRECTION_OUT;
mAudioInfo = CAudioInfo(sampleRate, channel, sampleType, audioType, -1);
}
+ //LCOV_EXCL_STOP
CAudioOutput::~CAudioOutput() {
}
/* Override the default value by audio type */
if (audioType == CAudioInfo::EAudioType::AUDIO_OUT_TYPE_VOIP)
streamSpec = CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_OUTPUT_VOIP;
+ else if (audioType == CAudioInfo::EAudioType::AUDIO_OUT_TYPE_MEDIA_NETWORK_SOURCE)
+ streamSpec = CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_OUTPUT_HIGH;
CPulseStreamSpec spec(streamSpec, mAudioInfo);
internalUnlock();
throw;
} catch (const std::bad_alloc&) {
+ //LCOV_EXCL_START
internalUnlock();
THROW_ERROR_MSG(CAudioError::EError::ERROR_OUT_OF_MEMORY, "Failed to allocate CPulseAudioClient object");
+ //LCOV_EXCL_STOP
}
}
int ret = mpPulseAudioClient->write(buffer, l);
if (ret < 0)
- THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INTERNAL_OPERATION,
- "The written result is invalid ret:%d", ret);
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INTERNAL_OPERATION,//LCOV_EXCL_LINE
+ "The written result is invalid ret:%d", ret); //LCOV_EXCL_LINE
buffer = static_cast<const uint8_t*>(buffer) + l;
lengthIter -= l;