THROW_ERROR_MSG(CAudioError::EError::ERROR_INVALID_STATE, "it is not permitted while started");
int errorCode = SOUND_MANAGER_ERROR_NONE;
- CAudioInfo::EAudioType audioType = CAudioInfo::EAudioType::AUDIO_IN_TYPE_MEDIA;
char *type = nullptr;
int index = -1;
bool avail = false;
if ((errorCode = sound_manager_get_type_from_stream_information(stream_info, &type)) != SOUND_MANAGER_ERROR_NONE)
THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "Parameter stream_info->stream_type is invalid [ret:%d]", errorCode);
if (mDirection == CAudioInfo::EAudioDirection::AUDIO_DIRECTION_IN)
- getAudioInfo().convertInputStreamType2AudioType(type, &audioType);
+ getAudioInfo().setAudioTypeByInputStreamType(type);
else
- getAudioInfo().convertOutputStreamType2AudioType(type, &audioType);
- getAudioInfo().setAudioType(audioType);
+ getAudioInfo().setAudioTypeByOutputStreamType(type);
if ((errorCode = sound_manager_get_index_from_stream_information(stream_info, &index)) != SOUND_MANAGER_ERROR_NONE)
THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "Parameter stream_info->index is invalid [ret:%d]", errorCode);