/[svn]/linuxsampler/trunk/src/engines/gig/DiskThread.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/DiskThread.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1424 by schoenebeck, Sun Oct 14 22:00:17 2007 UTC revision 1800 by schoenebeck, Sun Dec 7 01:26:46 2008 UTC
# Line 3  Line 3 
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  *
# Line 49  namespace LinuxSampler { namespace gig { Line 49  namespace LinuxSampler { namespace gig {
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();
# Line 62  namespace LinuxSampler { namespace gig { Line 62  namespace LinuxSampler { namespace gig {
62    
63              // the number of streams currently in usage              // the number of streams currently in usage
64              // printed on the console the main thread (along with the active voice count)              // printed on the console the main thread (along with the active voice count)
65              int ActiveStreamCount;              uint GetActiveStreamCount() { return atomic_read(&ActiveStreamCount); }
66                void SetActiveStreamCount(uint Streams) { atomic_set(&ActiveStreamCount, Streams); }
67              int ActiveStreamCountMax;              int ActiveStreamCountMax;
68    
69          protected:          protected:
# Line 97  namespace LinuxSampler { namespace gig { Line 98  namespace LinuxSampler { namespace gig {
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    
# Line 108  namespace LinuxSampler { namespace gig { Line 109  namespace LinuxSampler { namespace gig {
109              void                           RefillStreams();              void                           RefillStreams();
110              Stream::Handle                 CreateHandle();              Stream::Handle                 CreateHandle();
111              Stream::OrderID_t              CreateOrderID();              Stream::OrderID_t              CreateOrderID();
112    
113                atomic_t ActiveStreamCount;
114      };      };
115    
116  }} // namespace LinuxSampler::gig  }} // namespace LinuxSampler::gig

Legend:
Removed from v.1424  
changed lines
  Added in v.1800

  ViewVC Help
Powered by ViewVC