Skip to content

Commit

Permalink
Revert "ao_coreaudio: signal buffer underruns"
Browse files Browse the repository at this point in the history
This reverts commit 0341a6f.
Fixes #13348.
  • Loading branch information
ruihe774 authored and Akemi committed Apr 19, 2024
1 parent 5109c59 commit d46d428
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions audio/out/ao_coreaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,7 @@ static OSStatus render_cb_lpcm(void *ctx, AudioUnitRenderActionFlags *aflags,

int64_t end = mp_time_ns();
end += p->hw_latency_ns + ca_get_latency(ts) + ca_frames_to_ns(ao, frames);
int samples = ao_read_data(ao, planes, frames, end);

if (samples == 0)
*aflags |= kAudioUnitRenderAction_OutputIsSilence;

for (int n = 0; n < buffer_list->mNumberBuffers; n++)
buffer_list->mBuffers[n].mDataByteSize = samples * ao->sstride;

ao_read_data(ao, planes, frames, end);
return noErr;
}

Expand Down

0 comments on commit d46d428

Please sign in to comment.