}
assert(handle->audioIoHandle);
- CAudioInput* inputHandle = dynamic_cast<CAudioInput*>(handle->audioIoHandle);
+ CAudioInput* inputHandle = static_cast<CAudioInput*>(handle->audioIoHandle);
if (inputHandle == NULL) {
THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_HANDLE, "Handle is NULL");
}
}
assert(handle->audioIoHandle);
- CAudioIO* inputHandle = dynamic_cast<CAudioInput*>(handle->audioIoHandle);
+ CAudioIO* inputHandle = static_cast<CAudioInput*>(handle->audioIoHandle);
if (inputHandle == NULL) {
THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_HANDLE, "Handle is NULL");
}
"Parameters are NULL input:%p, buffer:%p", input, buffer);
}
- CAudioInput* inputHandle = dynamic_cast<CAudioInput*>(handle->audioIoHandle);
- assert(inputHandle);
+ CAudioInput* inputHandle = static_cast<CAudioInput*>(handle->audioIoHandle);
+ if (inputHandle == NULL) {
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_HANDLE, "Handle is NULL");
+ }
inputHandle->peek(buffer, &_length);
} catch (CAudioError e) {
"Parameters are NULL input:%p", input);
}
- CAudioInput* inputHandle = dynamic_cast<CAudioInput*>(handle->audioIoHandle);
- assert(inputHandle);
+ CAudioInput* inputHandle = static_cast<CAudioInput*>(handle->audioIoHandle);
+ if (inputHandle == NULL) {
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_HANDLE, "Handle is NULL");
+ }
inputHandle->drop();
} catch (CAudioError e) {
}
assert(handle->audioIoHandle);
- CAudioOutput* outputHandle = dynamic_cast<CAudioOutput*>(handle->audioIoHandle);
+ CAudioOutput* outputHandle = static_cast<CAudioOutput*>(handle->audioIoHandle);
if (outputHandle == NULL) {
THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_HANDLE, "Handle is NULL");
}
}
assert(handle->audioIoHandle);
- CAudioOutput* outputHandle = dynamic_cast<CAudioOutput*>(handle->audioIoHandle);
+ CAudioOutput* outputHandle = static_cast<CAudioOutput*>(handle->audioIoHandle);
if (outputHandle == NULL) {
THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_HANDLE, "Handle is NULL");
}