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 * |
187 |
|
|
188 |
DiskThread::DiskThread(uint BufferWrapElements) : Thread(true, false, 1, -2) { |
DiskThread::DiskThread(uint BufferWrapElements) : Thread(true, false, 1, -2) { |
189 |
DecompressionBuffer = ::gig::Sample::CreateDecompressionBuffer(CONFIG_STREAM_MAX_REFILL_SIZE); |
DecompressionBuffer = ::gig::Sample::CreateDecompressionBuffer(CONFIG_STREAM_MAX_REFILL_SIZE); |
190 |
CreationQueue = new RingBuffer<create_command_t>(1024); |
CreationQueue = new RingBuffer<create_command_t,false>(1024); |
191 |
DeletionQueue = new RingBuffer<delete_command_t>(1024); |
DeletionQueue = new RingBuffer<delete_command_t,false>(1024); |
192 |
GhostQueue = new RingBuffer<Stream::Handle>(CONFIG_MAX_STREAMS); |
GhostQueue = new RingBuffer<Stream::Handle,false>(CONFIG_MAX_STREAMS); |
193 |
Streams = CONFIG_MAX_STREAMS; |
Streams = CONFIG_MAX_STREAMS; |
194 |
RefillStreamsPerRun = CONFIG_REFILL_STREAMS_PER_RUN; |
RefillStreamsPerRun = CONFIG_REFILL_STREAMS_PER_RUN; |
195 |
for (int i = 0; i < CONFIG_MAX_STREAMS; i++) { |
for (int i = 0; i < CONFIG_MAX_STREAMS; i++) { |