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

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

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

revision 361 by schoenebeck, Wed Feb 9 01:22:18 2005 UTC revision 385 by schoenebeck, Thu Feb 17 02:53:45 2005 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                              *
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 185  namespace LinuxSampler { namespace gig { Line 186  namespace LinuxSampler { namespace gig {
186    
187    
188      DiskThread::DiskThread(uint BufferWrapElements) : Thread(false, 1, -2) {      DiskThread::DiskThread(uint BufferWrapElements) : Thread(false, 1, -2) {
189            DecompressionBuffer = ::gig::Sample::CreateDecompressionBuffer(MAX_REFILL_SIZE);
190          CreationQueue       = new RingBuffer<create_command_t>(1024);          CreationQueue       = new RingBuffer<create_command_t>(1024);
191          DeletionQueue       = new RingBuffer<delete_command_t>(1024);          DeletionQueue       = new RingBuffer<delete_command_t>(1024);
192          GhostQueue          = new RingBuffer<Stream::Handle>(MAX_INPUT_STREAMS);          GhostQueue          = new RingBuffer<Stream::Handle>(MAX_INPUT_STREAMS);
193          Streams             = MAX_INPUT_STREAMS;          Streams             = MAX_INPUT_STREAMS;
194          RefillStreamsPerRun = REFILL_STREAMS_PER_RUN;          RefillStreamsPerRun = REFILL_STREAMS_PER_RUN;
195          for (int i = 0; i < MAX_INPUT_STREAMS; i++) {          for (int i = 0; i < MAX_INPUT_STREAMS; i++) {
196              pStreams[i] = new Stream(STREAM_BUFFER_SIZE, BufferWrapElements); // 131072 sample words              pStreams[i] = new Stream(&DecompressionBuffer, STREAM_BUFFER_SIZE, BufferWrapElements); // 131072 sample words
197          }          }
198          for (int i = 1; i <= MAX_INPUT_STREAMS; i++) {          for (int i = 1; i <= MAX_INPUT_STREAMS; i++) {
199              pCreatedStreams[i] = NULL;              pCreatedStreams[i] = NULL;
# Line 205  namespace LinuxSampler { namespace gig { Line 207  namespace LinuxSampler { namespace gig {
207          if (CreationQueue) delete CreationQueue;          if (CreationQueue) delete CreationQueue;
208          if (DeletionQueue) delete DeletionQueue;          if (DeletionQueue) delete DeletionQueue;
209          if (GhostQueue)    delete GhostQueue;          if (GhostQueue)    delete GhostQueue;
210            ::gig::Sample::DestroyDecompressionBuffer(DecompressionBuffer);
211      }      }
212    
213      int DiskThread::Main() {      int DiskThread::Main() {

Legend:
Removed from v.361  
changed lines
  Added in v.385

  ViewVC Help
Powered by ViewVC