__mAudioIndex(audioIndex) {
// Check to invalid AudioInfo
if (sampleRate < CAudioInfo::MIN_SYSTEM_SAMPLERATE || sampleRate > CAudioInfo::MAX_SYSTEM_SAMPLERATE) {
- THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "The sampleRate is invalid [sampleRate:%d]", sampleRate);
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "The sampleRate is invalid [sampleRate:%u]", sampleRate);
}
if (channel < CAudioInfo::EChannel::CHANNEL_MONO || channel >= CAudioInfo::EChannel::CHANNEL_MAX) {
- THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "The channel is invalid [channel:%d]", channel);
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "The channel is invalid [channel:%u]", to_integral(channel));
}
if (sampleType < CAudioInfo::ESampleType::SAMPLE_TYPE_U8 || sampleType >= CAudioInfo::ESampleType::SAMPLE_TYPE_MAX) {
- THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "The sampleType is invalid [sampleType:%d]", sampleType);
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "The sampleType is invalid [sampleType:%u]", to_integral(sampleType));
}
if (audioType < CAudioInfo::EAudioType::AUDIO_IN_TYPE_MEDIA || audioType >= CAudioInfo::EAudioType::AUDIO_TYPE_MAX) {
- THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "The audioType is invalid [audioType:%d]", audioType);
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "The audioType is invalid [audioType:%u]", to_integral(audioType));
}
}
void CAudioInfo::convertAudioType2StreamType(CAudioInfo::EAudioType audioType, char **streamType) {
if (audioType < CAudioInfo::EAudioType::AUDIO_IN_TYPE_MEDIA || audioType >= CAudioInfo::EAudioType::AUDIO_TYPE_MAX) {
- THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_NOT_SUPPORTED_TYPE, "The audioType is not supported [audioType:%d]", audioType);
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_NOT_SUPPORTED_TYPE,
+ "The audioType is not supported [audioType:%u]", to_integral(audioType));
}
*streamType = (char *)__STREAM_TYPE_TABLE[(unsigned int)audioType];
return;