1 |
schoenebeck |
53 |
/*************************************************************************** |
2 |
|
|
* * |
3 |
|
|
* LinuxSampler - modular, streaming capable sampler * |
4 |
|
|
* * |
5 |
iliev |
2012 |
* Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck * |
6 |
|
|
* Copyright (C) 2005-2009 Christian Schoenebeck * |
7 |
persson |
3455 |
* Copyright (C) 2009-2019 Grigor Iliev * |
8 |
schoenebeck |
53 |
* * |
9 |
|
|
* This program is free software; you can redistribute it and/or modify * |
10 |
|
|
* it under the terms of the GNU General Public License as published by * |
11 |
|
|
* the Free Software Foundation; either version 2 of the License, or * |
12 |
|
|
* (at your option) any later version. * |
13 |
|
|
* * |
14 |
|
|
* This program is distributed in the hope that it will be useful, * |
15 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
16 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
17 |
|
|
* GNU General Public License for more details. * |
18 |
|
|
* * |
19 |
|
|
* You should have received a copy of the GNU General Public License * |
20 |
|
|
* along with this program; if not, write to the Free Software * |
21 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * |
22 |
|
|
* MA 02111-1307 USA * |
23 |
|
|
***************************************************************************/ |
24 |
|
|
|
25 |
|
|
#ifndef __LS_GIG_DISKTHREAD_H__ |
26 |
iliev |
2012 |
#define __LS_GIG_DISKTHREAD_H__ |
27 |
schoenebeck |
53 |
|
28 |
iliev |
2012 |
#include "../InstrumentManagerBase.h" |
29 |
|
|
#include "../common/DiskThreadBase.h" |
30 |
|
|
#include "InstrumentResourceManager.h" |
31 |
schoenebeck |
505 |
|
32 |
schoenebeck |
3052 |
#if AC_APPLE_UNIVERSAL_BUILD |
33 |
|
|
# include <libgig/gig.h> |
34 |
|
|
#else |
35 |
|
|
# include <gig.h> |
36 |
|
|
#endif |
37 |
|
|
|
38 |
persson |
3455 |
namespace LinuxSampler { |
39 |
|
|
template <> |
40 |
|
|
LinuxSampler::Stream* LinuxSampler::DiskThreadBase< ::gig::DimensionRegion, gig::InstrumentResourceManager>::SLOT_RESERVED; |
41 |
schoenebeck |
53 |
|
42 |
persson |
3455 |
namespace gig { |
43 |
|
|
|
44 |
iliev |
2012 |
class DiskThread: public LinuxSampler::DiskThreadBase< ::gig::DimensionRegion, InstrumentResourceManager> { |
45 |
schoenebeck |
53 |
protected: |
46 |
schoenebeck |
385 |
::gig::buffer_t DecompressionBuffer; ///< Used for thread safe streaming. |
47 |
|
|
|
48 |
iliev |
2012 |
virtual LinuxSampler::Stream* CreateStream(long BufferSize, uint BufferWrapElements); |
49 |
schoenebeck |
385 |
|
50 |
iliev |
2012 |
virtual void LaunchStream ( |
51 |
|
|
LinuxSampler::Stream* pStream, |
52 |
|
|
Stream::Handle hStream, |
53 |
|
|
Stream::reference_t* pExportReference, |
54 |
|
|
::gig::DimensionRegion* pRgn, |
55 |
|
|
unsigned long SampleOffset, |
56 |
|
|
bool DoLoop |
57 |
|
|
); |
58 |
schoenebeck |
53 |
|
59 |
iliev |
2012 |
public: |
60 |
|
|
DiskThread(int MaxStreams, uint BufferWrapElements, InstrumentResourceManager* pInstruments); |
61 |
|
|
virtual ~DiskThread(); |
62 |
schoenebeck |
53 |
}; |
63 |
|
|
|
64 |
iliev |
2012 |
|
65 |
schoenebeck |
53 |
}} // namespace LinuxSampler::gig |
66 |
|
|
|
67 |
iliev |
2012 |
#endif /* __LS_GIG_STREAM_H__ */ |
68 |
|
|
|