37 |
|
|
38 |
int CompareStreamWriteSpace(const void* a, const void* b); |
int CompareStreamWriteSpace(const void* a, const void* b); |
39 |
|
|
40 |
|
/** @brief Disk Reader Thread |
41 |
|
* |
42 |
|
* The disk reader thread is responsible for periodically refilling |
43 |
|
* disk streams in parallel to the audio thread's rendering process. |
44 |
|
*/ |
45 |
class DiskThread : public Thread { |
class DiskThread : public Thread { |
46 |
public: |
public: |
47 |
// Methods |
// Methods |
88 |
RingBuffer<delete_command_t>* DeletionQueue; ///< Contains commands to delete streams |
RingBuffer<delete_command_t>* DeletionQueue; ///< Contains commands to delete streams |
89 |
RingBuffer<Stream::Handle>* GhostQueue; ///< Contains handles to streams that are not used anymore and weren't deletable immediately |
RingBuffer<Stream::Handle>* GhostQueue; ///< Contains handles to streams that are not used anymore and weren't deletable immediately |
90 |
unsigned int RefillStreamsPerRun; ///< How many streams should be refilled in each loop run |
unsigned int RefillStreamsPerRun; ///< How many streams should be refilled in each loop run |
91 |
Stream* pStreams[CONFIG_MAX_STREAMS]; ///< Contains all disk streams (wether used or unused) |
Stream* pStreams[CONFIG_MAX_STREAMS]; ///< Contains all disk streams (whether used or unused) |
92 |
Stream* pCreatedStreams[CONFIG_MAX_STREAMS + 1]; ///< This is where the voice (audio thread) picks up it's meanwhile hopefully created disk stream. |
Stream* pCreatedStreams[CONFIG_MAX_STREAMS + 1]; ///< This is where the voice (audio thread) picks up it's meanwhile hopefully created disk stream. |
93 |
static Stream* SLOT_RESERVED; ///< This value is used to mark an entry in pCreatedStreams[] as reserved. |
static Stream* SLOT_RESERVED; ///< This value is used to mark an entry in pCreatedStreams[] as reserved. |
94 |
|
|