WASAPI: Change some errors messages to warnings

There shouldn't be errors if the actual source has successfully been
created, just warnings.
master
jp9000 2014-03-07 13:04:38 -07:00
parent fd579fe7f4
commit 2c3a3f4e65
2 changed files with 10 additions and 8 deletions

View File

@ -89,7 +89,7 @@ void GetWASAPIAudioDevices(vector<AudioDeviceInfo> &devices, bool input)
GetWASAPIAudioDevices_(devices, input); GetWASAPIAudioDevices_(devices, input);
} catch (HRError error) { } catch (HRError error) {
blog(LOG_ERROR, "[GetWASAPIAudioDevices] %s: %lX", blog(LOG_WARNING, "[GetWASAPIAudioDevices] %s: %lX",
error.str, error.hr); error.str, error.hr);
} }
} }

View File

@ -238,13 +238,13 @@ bool WASAPISource::TryInitialize()
Initialize(); Initialize();
} catch (HRError error) { } catch (HRError error) {
blog(LOG_ERROR, "[WASAPISource::TryInitialize]:[%s] %s: %lX", blog(LOG_WARNING, "[WASAPISource::TryInitialize]:[%s] %s: %lX",
device_name.empty() ? device_name.empty() ?
device_id.c_str() : device_name.c_str(), device_id.c_str() : device_name.c_str(),
error.str, error.hr); error.str, error.hr);
} catch (const char *error) { } catch (const char *error) {
blog(LOG_ERROR, "[WASAPISource::TryInitialize]:[%s] %s", blog(LOG_WARNING, "[WASAPISource::TryInitialize]:[%s] %s",
device_name.empty() ? device_name.empty() ?
device_id.c_str() : device_name.c_str(), device_id.c_str() : device_name.c_str(),
error); error);
@ -261,7 +261,7 @@ void WASAPISource::Reconnect()
0, nullptr); 0, nullptr);
if (!reconnectThread.Valid()) if (!reconnectThread.Valid())
blog(LOG_ERROR, "[WASAPISource::Reconnect] " blog(LOG_WARNING, "[WASAPISource::Reconnect] "
"Failed to intiialize reconnect thread: %d", "Failed to intiialize reconnect thread: %d",
GetLastError()); GetLastError());
} }
@ -301,7 +301,8 @@ bool WASAPISource::ProcessCaptureData()
if (FAILED(res)) { if (FAILED(res)) {
if (res != AUDCLNT_E_DEVICE_INVALIDATED) if (res != AUDCLNT_E_DEVICE_INVALIDATED)
blog(LOG_ERROR, "[WASAPISource::GetCaptureData]" blog(LOG_WARNING,
"[WASAPISource::GetCaptureData]"
" capture->GetNextPacketSize" " capture->GetNextPacketSize"
" failed: %lX", res); " failed: %lX", res);
return false; return false;
@ -313,7 +314,8 @@ bool WASAPISource::ProcessCaptureData()
res = capture->GetBuffer(&buffer, &frames, &flags, &pos, &ts); res = capture->GetBuffer(&buffer, &frames, &flags, &pos, &ts);
if (FAILED(res)) { if (FAILED(res)) {
if (res != AUDCLNT_E_DEVICE_INVALIDATED) if (res != AUDCLNT_E_DEVICE_INVALIDATED)
blog(LOG_ERROR, "[WASAPISource::GetCaptureData]" blog(LOG_WARNING,
"[WASAPISource::GetCaptureData]"
" capture->GetBuffer" " capture->GetBuffer"
" failed: %lX", res); " failed: %lX", res);
return false; return false;