Skip to content

Commit

Permalink
RtAudio patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Mar 14, 2024
1 parent 03a4c5a commit bde6593
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
17 changes: 17 additions & 0 deletions etc/SuperBuild/RtAudio-patch/RtAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4476,6 +4476,23 @@ RtAudio::DeviceInfo RtApiWasapi::getDeviceInfo( unsigned int device )
hr = audioClient->GetMixFormat( &deviceFormat );
if ( FAILED( hr ) ) {
errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve device mix format.";
switch(hr)
{
case AUDCLNT_E_DEVICE_INVALIDATED:
errorText_ += "Invalidated Device.";
break;
case AUDCLNT_E_SERVICE_NOT_RUNNING:
errorText_ += "Service not runnning.";
break;
case E_POINTER:
errorText_ += "Pointer issue.";
break;
case E_OUTOFMEMORY:
errorText_ += "Out of Memory.";
break;
default:
break;
}
goto Exit;
}

Expand Down
4 changes: 3 additions & 1 deletion etc/SuperBuild/cmake/Modules/BuildRtAudio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ set(RtAudio_PATCH )

#
# \bug: this is needed to have Linux not hang when switching clips quickly.
# We also patch windows, as we added more debugging checks when audio
# device mix fails.
#
if (UNIX AND NOT APPLE)
if (NOT APPLE)
set(RtAudio_PATCH ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/RtAudio-patch/RtAudio.cpp
${CMAKE_CURRENT_BINARY_DIR}/RtAudio/src/RtAudio/RtAudio.cpp )
Expand Down

0 comments on commit bde6593

Please sign in to comment.