3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2007 Christian Schoenebeck * |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
49 |
class DiskThread : public Thread { |
class DiskThread : public Thread { |
50 |
public: |
public: |
51 |
// Methods |
// Methods |
52 |
DiskThread(uint BufferWrapElements, InstrumentResourceManager* pInstruments); |
DiskThread(int MaxStreams, uint BufferWrapElements, InstrumentResourceManager* pInstruments); |
53 |
virtual ~DiskThread(); |
virtual ~DiskThread(); |
54 |
void Reset(); |
void Reset(); |
55 |
String GetBufferFillBytes(); |
String GetBufferFillBytes(); |
98 |
RingBuffer<Stream::Handle,false> DeletionNotificationQueue; ///< In case the original sender requested a notification for its stream deletion order, this queue will receive the handle of the respective stream once actually be deleted by the disk thread. |
RingBuffer<Stream::Handle,false> DeletionNotificationQueue; ///< In case the original sender requested a notification for its stream deletion order, this queue will receive the handle of the respective stream once actually be deleted by the disk thread. |
99 |
RingBuffer< ::gig::DimensionRegion*,false>* DeleteDimregQueue; ///< Contains dimension regions that are not used anymore and should be handed back to the instrument resource manager |
RingBuffer< ::gig::DimensionRegion*,false>* DeleteDimregQueue; ///< Contains dimension regions that are not used anymore and should be handed back to the instrument resource manager |
100 |
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 |
101 |
Stream* pStreams[CONFIG_MAX_STREAMS]; ///< Contains all disk streams (whether used or unused) |
Stream** pStreams; ///< Contains all disk streams (whether used or unused) |
102 |
Stream* pCreatedStreams[CONFIG_MAX_STREAMS + 1]; ///< This is where the voice (audio thread) picks up it's meanwhile hopefully created disk stream. |
Stream** pCreatedStreams; ///< This is where the voice (audio thread) picks up it's meanwhile hopefully created disk stream. |
103 |
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. |
104 |
InstrumentResourceManager* pInstruments; ///< The instrument resource manager of the engine that is using this disk thread. Used by the dimension region deletion feature. |
InstrumentResourceManager* pInstruments; ///< The instrument resource manager of the engine that is using this disk thread. Used by the dimension region deletion feature. |
105 |
|
|