Commit c837b50f authored by Jonas Stienen's avatar Jonas Stienen
Browse files

Fixing but when trying to initialize ASIO sound card that is unattached...

Fixing but when trying to initialize ASIO sound card that is unattached (returns zero in/out channels, which is considered an invalid parameter state now)
parent be4f4feb
......@@ -776,6 +776,9 @@ ITASIO_API ASIOError ITAsioInitializeDriver(const char* pszDriverName) {
size_t nNumInOutChannels = size_t( lNumInChannels + lNumOutChannels );
asioDriverInfo.channelInfos.resize( nNumInOutChannels );
if( nNumInOutChannels == 0 )
return ASE_InvalidParameter;
// Retrieve channel info
ASIOChannelInfo* pInfo = reinterpret_cast<ASIOChannelInfo*>(&asioDriverInfo.channelInfos.front());
if( ( aeResult = ASIOGetChannelInfo( pInfo ) ) != ASE_OK )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment