mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
Bug 1448705 - Use input latency for draining. r=jya, a=RyanVM
--HG-- extra : source : b2904f128f854a71216f299b835da5a422ceb3cd extra : intermediate-source : eae4410ea11d83feed90ca9d3b6bd5a9c67c17a7
This commit is contained in:
parent
f1e8f6742a
commit
55bde34653
1 changed files with 3 additions and 5 deletions
|
|
@ -362,15 +362,13 @@ size_t
|
|||
AudioConverter::ResampleRecipientFrames(size_t aFrames) const
|
||||
{
|
||||
if (!aFrames && mIn.Rate() != mOut.Rate()) {
|
||||
// The resampler will be drained, account for frames currently buffered
|
||||
// in the resampler.
|
||||
if (!mResampler) {
|
||||
return 0;
|
||||
}
|
||||
return speex_resampler_get_output_latency(mResampler);
|
||||
} else {
|
||||
return (uint64_t)aFrames * mOut.Rate() / mIn.Rate() + 1;
|
||||
// We drain by pushing in get_input_latency() samples of 0
|
||||
aFrames = speex_resampler_get_input_latency(mResampler);
|
||||
}
|
||||
return (uint64_t)aFrames * mOut.Rate() / mIn.Rate() + 1;
|
||||
}
|
||||
|
||||
size_t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue