Commit b883b9bd authored by Julien Wadel's avatar Julien Wadel
Browse files

Add a log to know what configuration lead to the initialization error.

parent 36f5c602
......@@ -199,6 +199,8 @@ int MSWASAPIReader::activate()
return 0;
error:
ms_error("Wasapi capture couldn't be initialized at %i Hz, %i channels, with buffer size %i (%i ms), %i-bit frames are on %i bits", (int)mRate, (int)mNChannels,
(int)mBufferFrameCount, (int)1000*mBufferFrameCount/ (mRate > 0 ? mRate : -1), (pUsedWfx ? (int)pUsedWfx->wBitsPerSample : -1), mNBlockAlign*8);
FREE_PTR(pSupportedWfx);
if(mAudioClient) mAudioClient->Reset();
return -1;
......
......@@ -204,6 +204,8 @@ int MSWASAPIWriter::activate()
return 0;
error:
ms_error("Wasapi playback couldn't be initialized at %i Hz, %i channels, with buffer size %i (%i ms), %i-bit frames are on %i bits", (int)mRate, (int)mNChannels,
(int)mBufferFrameCount, (int)1000*mBufferFrameCount/ (mRate > 0 ? mRate : -1), (pUsedWfx ? (int)pUsedWfx->wBitsPerSample : -1), mNBlockAlign*8);
FREE_PTR(pSupportedWfx);
if(mAudioClient) mAudioClient->Reset();
return -1;
......
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