--- linuxsampler/trunk/src/engines/gig/Stream.h 2004/04/26 17:15:51 53 +++ linuxsampler/trunk/src/engines/gig/Stream.h 2005/05/03 01:00:25 505 @@ -2,7 +2,8 @@ * * * LinuxSampler - modular, streaming capable sampler * * * - * Copyright (C) 2003 by Benno Senoner * + * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * + * Copyright (C) 2005 Christian Schoenebeck * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -29,8 +30,9 @@ # warning Stream.h included #endif // DEBUG_HEADERS +#include + #include "../../common/RingBuffer.h" -#include "../../lib/fileloader/libgig/gig.h" namespace LinuxSampler { namespace gig { @@ -52,13 +54,13 @@ }; // Methods - Stream(uint BufferSize, uint BufferWrapElements); - ~Stream(); + Stream( ::gig::buffer_t* pDecompressionBuffer, uint BufferSize, uint BufferWrapElements); + virtual ~Stream(); int ReadAhead(unsigned long SampleCount); void WriteSilence(unsigned long SilenceSampleWords); inline int GetReadSpace() { - return (pRingBuffer && State == state_active) ? pRingBuffer->read_space() : 0; + return (pRingBuffer && State != state_unused) ? pRingBuffer->read_space() : 0; } inline int GetWriteSpace() { @@ -112,9 +114,11 @@ ::gig::playback_state_t PlaybackState; RingBuffer* pRingBuffer; bool DoLoop; + ::gig::buffer_t* pDecompressionBuffer; // Static Attributes static uint UnusedStreams; //< Reflects how many stream objects of all stream instances are currently not in use. + static uint TotalStreams; //< Reflects how many stream objects currently exist. // Methods inline void Reset() {