mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-14 02:27:21 -07:00
cleanup while investigating extraction regression
This commit is contained in:
parent
a697d40b05
commit
cd3d8f3846
1 changed files with 3 additions and 5 deletions
|
@ -168,11 +168,9 @@ void SfxExtractor::frameCallback() {
|
|||
}
|
||||
|
||||
void SfxExtractor::prime() {
|
||||
while (true) {
|
||||
do {
|
||||
AudioMgr_CreateNextAudioBuffer(tempBuffer + 0, SFX_EXTRACTION_ONE_FRAME);
|
||||
if (isAllZero(tempBuffer + 0, SFX_EXTRACTION_ONE_FRAME * 2))
|
||||
break;
|
||||
}
|
||||
} while(isAllZero(tempBuffer + 0, SFX_EXTRACTION_ONE_FRAME * 2));
|
||||
captureThreadState = CT_FINISHED;
|
||||
}
|
||||
|
||||
|
@ -181,7 +179,7 @@ void SfxExtractor::captureCallback() {
|
|||
prime();
|
||||
if (captureThreadState != CT_READY)
|
||||
return; // No work to do at the moment.
|
||||
memset(tempBuffer, 0, SFX_EXTRACTION_BUFFER_SIZE * 4);
|
||||
memset(tempBuffer, 0, sizeof(tempBuffer));
|
||||
int16_t* mark = tempBuffer + 0;
|
||||
size_t samplesLeft = SFX_EXTRACTION_BUFFER_SIZE;
|
||||
bool outputStarted = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue