diff options
| author | Konstantin <const@const.me> | 2023-01-16 22:28:51 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-01-16 22:28:51 +0100 |
| commit | 4b7e463aae6da3e12d335f52e116b4f0ec779804 (patch) | |
| tree | 5ff1c7b46cfa8bbab6f07acc0c803103279a0c85 | |
| parent | 8648d1d5c6766af410032a5096bfe8dedf519eef (diff) | |
Comments
| -rw-r--r-- | Whisper/Whisper/ContextImpl.capture.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Whisper/Whisper/ContextImpl.capture.cpp b/Whisper/Whisper/ContextImpl.capture.cpp index ba4b10e..70bce77 100644 --- a/Whisper/Whisper/ContextImpl.capture.cpp +++ b/Whisper/Whisper/ContextImpl.capture.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "ContextImpl.h" #include "../API/iMediaFoundation.cl.h" #include "../MF/AudioBuffer.h" @@ -49,6 +49,7 @@ namespace } }; + // Same data as in the Whisper.sCaptureParams public structure, the durations are scaled from FP32 seconds into uint32_t samples at 16 kHz struct CaptureParams { uint32_t minDuration, maxDuration, dropStartSilence, pauseDuration; @@ -90,6 +91,7 @@ namespace ProfileCollection& profiler; iContext* const whisperContext; + // Set the state bit, and if needed notify user with the callback. HRESULT setStateFlag( eCaptureStatus newBit ) noexcept { const uint8_t bit = (uint8_t)newBit; @@ -101,6 +103,7 @@ namespace return callbacks.captureStatus( callbacks.pv, (eCaptureStatus)( oldVal | bit ) ); } + // Clear the state bit, and if needed notify user with the callback HRESULT clearStateFlag( eCaptureStatus clearBit ) noexcept { const uint8_t bit = (uint8_t)clearBit; @@ -293,7 +296,7 @@ namespace if( dwFlags & MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED ) { - logError( u8"Media type changes ain’t supported by the library." ); + logError( u8"Media type changes ain’t supported by the library." ); return E_UNEXPECTED; } |
