mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 08:52:36 +00:00
common: Rename ring_buffer_base to RingBuffer.
This commit is contained in:
parent
42fb06d0f1
commit
79ed9f2036
@ -44,17 +44,17 @@
|
|||||||
* data for further processing.
|
* data for further processing.
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class ring_buffer_base {
|
class RingBuffer {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Constructor for a ring buffer.
|
* Constructor for a ring buffer.
|
||||||
*
|
*
|
||||||
* This performs an allocation, but is the only allocation that will happen
|
* This performs an allocation, but is the only allocation that will happen
|
||||||
* for the life time of a `ring_buffer_base`.
|
* for the life time of a `RingBuffer`.
|
||||||
*
|
*
|
||||||
* @param capacity The maximum number of element this ring buffer will hold.
|
* @param capacity The maximum number of element this ring buffer will hold.
|
||||||
*/
|
*/
|
||||||
ring_buffer_base(int capacity)
|
RingBuffer(int capacity)
|
||||||
/* One more element to distinguish from empty and full buffer. */
|
/* One more element to distinguish from empty and full buffer. */
|
||||||
: capacity_(capacity + 1) {
|
: capacity_(capacity + 1) {
|
||||||
ASSERT(storage_capacity() < std::numeric_limits<int>::max() / 2 &&
|
ASSERT(storage_capacity() < std::numeric_limits<int>::max() / 2 &&
|
||||||
|
@ -131,7 +131,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t frame_size;
|
size_t frame_size;
|
||||||
ring_buffer_base<u8> buffer;
|
RingBuffer<u8> buffer;
|
||||||
std::mutex buffer_mutex;
|
std::mutex buffer_mutex;
|
||||||
std::condition_variable buffer_cv;
|
std::condition_variable buffer_cv;
|
||||||
cubeb_stream* stream{};
|
cubeb_stream* stream{};
|
||||||
|
Loading…
Reference in New Issue
Block a user