mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 14:15:47 -04:00
dep/cubeb: Sync to 19fcbef
And apply PR #740 (Re-enable and polish IAudioClient3 to achieve lower latencies). `*latency_frames = min_period;` in wasapi_get_min_latency was changed to `*latency_frames = hns_to_frames(params.rate, min_period_rt);`, as otherwise it reports in mixer frames, not stream frames.
This commit is contained in:
@ -182,7 +182,9 @@ public:
|
||||
if (length_ + length > capacity_) {
|
||||
reserve(length_ + length);
|
||||
}
|
||||
PodCopy(data_ + length_, elements, length);
|
||||
if (data_) {
|
||||
PodCopy(data_ + length_, elements, length);
|
||||
}
|
||||
length_ += length;
|
||||
}
|
||||
|
||||
@ -195,12 +197,14 @@ public:
|
||||
if (length_ + length > capacity_) {
|
||||
reserve(length + length_);
|
||||
}
|
||||
PodZero(data_ + length_, length);
|
||||
if (data_) {
|
||||
PodZero(data_ + length_, length);
|
||||
}
|
||||
length_ += length;
|
||||
}
|
||||
|
||||
/** Prepend `length` zero-ed elements to the end of the array, resizing the
|
||||
* array if needed.
|
||||
/** Prepend `length` zero-ed elements to the front of the array, resizing and
|
||||
* shifting the array if needed.
|
||||
* @parameter length the number of elements to prepend to the array.
|
||||
*/
|
||||
void push_front_silence(size_t length)
|
||||
@ -208,8 +212,10 @@ public:
|
||||
if (length_ + length > capacity_) {
|
||||
reserve(length + length_);
|
||||
}
|
||||
PodMove(data_ + length, data_, length_);
|
||||
PodZero(data_, length);
|
||||
if (data_) {
|
||||
PodMove(data_ + length, data_, length_);
|
||||
PodZero(data_, length);
|
||||
}
|
||||
length_ += length;
|
||||
}
|
||||
|
||||
@ -227,6 +233,9 @@ public:
|
||||
if (length > length_) {
|
||||
return false;
|
||||
}
|
||||
if (!data_) {
|
||||
return true;
|
||||
}
|
||||
if (elements) {
|
||||
PodCopy(elements, data_, length);
|
||||
}
|
||||
|
Reference in New Issue
Block a user