diff options
| author | Gary Scavone <gary.scavone@mcgill.ca> | 2022-01-09 09:31:11 -0500 |
|---|---|---|
| committer | Gary Scavone <gary.scavone@mcgill.ca> | 2022-01-09 09:31:11 -0500 |
| commit | 53efa58f92c55e0963479f32605ac89359eac906 (patch) | |
| tree | 18485ddef9183ac429d5b6802bc76762a48f5e43 /RtAudio.cpp | |
| parent | cdebc0d9e165a09d98b0351e1ac823e1086d8e08 (diff) | |
A few more WASAPI fixes for new selection scheme.
Diffstat (limited to 'RtAudio.cpp')
| -rw-r--r-- | RtAudio.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp index c6444a6..13e5592 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -4433,7 +4433,7 @@ RtApiWasapi::~RtApiWasapi() unsigned int RtApiWasapi::getDefaultInputDevice( void ) { - IMMDevice* devicePtr = NULL; + IMMDevice* devicePtr = NULL; LPWSTR defaultId = NULL; std::string id; @@ -4441,7 +4441,7 @@ unsigned int RtApiWasapi::getDefaultInputDevice( void ) errorText_.clear(); // Get the default capture device Id. - hr = deviceEnumerator_->GetDefaultAudioEndpoint( eCapture, eConsole, &devicePtr ); + HRESULT hr = deviceEnumerator_->GetDefaultAudioEndpoint( eCapture, eConsole, &devicePtr ); if ( FAILED( hr ) ) { errorText_ = "RtApiWasapi::getDefaultInputDevice: Unable to retrieve default capture device handle."; goto Release; @@ -4452,7 +4452,7 @@ unsigned int RtApiWasapi::getDefaultInputDevice( void ) errorText_ = "RtApiWasapi::getDefaultInputDevice: Unable to get default capture device Id."; goto Release; } - id = defaultId; + id = convertCharPointerToStdString( defaultId ); Release: SAFE_RELEASE( devicePtr ); @@ -4498,7 +4498,7 @@ unsigned int RtApiWasapi::getDefaultOutputDevice( void ) errorText_.clear(); // Get the default render device Id. - hr = deviceEnumerator_->GetDefaultAudioEndpoint( eRender, eConsole, &devicePtr ); + HRESULT hr = deviceEnumerator_->GetDefaultAudioEndpoint( eRender, eConsole, &devicePtr ); if ( FAILED( hr ) ) { errorText_ = "RtApiWasapi::getDefaultOutputDevice: Unable to retrieve default render device handle."; goto Release; @@ -4509,7 +4509,7 @@ unsigned int RtApiWasapi::getDefaultOutputDevice( void ) errorText_ = "RtApiWasapi::getDefaultOutputDevice: Unable to get default render device Id."; goto Release; } - id = defaultId; + id = convertCharPointerToStdString( defaultId ); Release: SAFE_RELEASE( devicePtr ); @@ -4649,7 +4649,7 @@ void RtApiWasapi::probeDevices( void ) error( RTAUDIO_WARNING ); continue; } - ids.push_back( std::pair< deviceId, isCaptureDevice > ); + ids.push_back( std::pair< convertCharPointerToStdString(deviceId), isCaptureDevice > ); CoTaskMemFree( deviceId ); } |
