/[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 554 by schoenebeck, Thu May 19 19:25:14 2005 UTC revision 970 by schoenebeck, Wed Dec 6 22:28:17 2006 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 Christian Schoenebeck                              *   *   Copyright (C) 2005, 2006 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 37  namespace LinuxSampler { namespace gig { Line 37  namespace LinuxSampler { namespace gig {
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
# Line 45  namespace LinuxSampler { namespace gig { Line 50  namespace LinuxSampler { namespace gig {
50              void    Reset();              void    Reset();
51              String  GetBufferFillBytes();              String  GetBufferFillBytes();
52              String  GetBufferFillPercentage();              String  GetBufferFillPercentage();
53              int     OrderNewStream(Stream::reference_t* pStreamRef, ::gig::Sample* pSample, unsigned long SampleOffset, bool DoLoop);              int     OrderNewStream(Stream::reference_t* pStreamRef, ::gig::DimensionRegion* pDimRgn, unsigned long SampleOffset, bool DoLoop);
54              int     OrderDeletionOfStream(Stream::reference_t* pStreamRef);              int     OrderDeletionOfStream(Stream::reference_t* pStreamRef);
55              Stream* AskForCreatedStream(Stream::OrderID_t StreamOrderID);              Stream* AskForCreatedStream(Stream::OrderID_t StreamOrderID);
56    
# Line 66  namespace LinuxSampler { namespace gig { Line 71  namespace LinuxSampler { namespace gig {
71                  Stream::OrderID_t    OrderID;                  Stream::OrderID_t    OrderID;
72                  Stream::Handle       hStream;                  Stream::Handle       hStream;
73                  Stream::reference_t* pStreamRef;                  Stream::reference_t* pStreamRef;
74                  ::gig::Sample*       pSample;                  ::gig::DimensionRegion* pDimRgn;
75                  unsigned long        SampleOffset;                  unsigned long        SampleOffset;
76                  bool                 DoLoop;                  bool                 DoLoop;
77              };              };
# Line 79  namespace LinuxSampler { namespace gig { Line 84  namespace LinuxSampler { namespace gig {
84              // Attributes              // Attributes
85              bool                           IsIdle;              bool                           IsIdle;
86              uint                           Streams;              uint                           Streams;
87              RingBuffer<create_command_t>*  CreationQueue;                          ///< Contains commands to create streams              RingBuffer<create_command_t,false>* CreationQueue;                      ///< Contains commands to create streams
88              RingBuffer<delete_command_t>*  DeletionQueue;                          ///< Contains commands to delete streams              RingBuffer<delete_command_t,false>* 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,false>*   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    

Legend:
Removed from v.554  
changed lines
  Added in v.970

  ViewVC Help
Powered by ViewVC