Skip to content

Commit

Permalink
Remove unused audioProcessingDoneEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraj authored Aug 8, 2024
1 parent 4a4c06a commit b796172
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ namespace {
IAudioClient *audioClient = NULL;
IAudioRenderClient *renderClient = NULL;
HANDLE bufferEndEvent = 0;
HANDLE audioProcessingDoneEvent;
UINT32 bufferFrames;
WAVEFORMATEX requestedFormat;
WAVEFORMATEX *closestFormat;
Expand Down Expand Up @@ -229,7 +228,7 @@ namespace {
void audioThread(LPVOID) {
submitBuffer(bufferFrames);
audioClient->Start();
while (WAIT_OBJECT_0 != WaitForSingleObject(audioProcessingDoneEvent, 0)) {
while (true) {
WaitForSingleObject(bufferEndEvent, INFINITE);
UINT32 padding = 0;
HRESULT result = audioClient->GetCurrentPadding(&padding);
Expand Down Expand Up @@ -269,9 +268,6 @@ void kinc_a2_init() {
a2_buffer.channels[0] = (float *)malloc(a2_buffer.data_size * sizeof(float));
a2_buffer.channels[1] = (float *)malloc(a2_buffer.data_size * sizeof(float));

audioProcessingDoneEvent = CreateEvent(0, FALSE, FALSE, 0);
kinc_affirm(audioProcessingDoneEvent != 0);

#ifdef KINC_WINDOWSAPP
renderer = Make<AudioRenderer>();

Expand Down

0 comments on commit b796172

Please sign in to comment.