26 |
|
|
27 |
#include "../../common/global.h" |
#include "../../common/global.h" |
28 |
|
|
29 |
#if DEBUG_HEADERS |
#include <gig.h> |
|
# warning InstrumentResourceManager.h included |
|
|
#endif // DEBUG_HEADERS |
|
30 |
|
|
31 |
#include "../../common/global.h" |
#include "../../common/global.h" |
32 |
#include "../../common/LinuxSamplerException.h" |
#include "../../common/LinuxSamplerException.h" |
33 |
#include "../../common/ResourceManager.h" |
#include "../../common/ResourceManager.h" |
34 |
#include "../../drivers/audio/AudioOutputDevice.h" |
#include "../../drivers/audio/AudioOutputDevice.h" |
|
#include "../../lib/fileloader/libgig/gig.h" |
|
|
|
|
|
// preload 64k samples = 128kB of data in RAM for 16 bit mono samples |
|
|
#define NUM_RAM_PRELOAD_SAMPLES 32768 |
|
35 |
|
|
36 |
//namespace libgig = gig; |
//namespace libgig = gig; |
37 |
|
|
76 |
class InstrumentResourceManager : public ResourceManager<instrument_id_t, ::gig::Instrument> { |
class InstrumentResourceManager : public ResourceManager<instrument_id_t, ::gig::Instrument> { |
77 |
public: |
public: |
78 |
virtual ~InstrumentResourceManager() {} |
virtual ~InstrumentResourceManager() {} |
79 |
|
static void OnInstrumentLoadingProgress(::gig::progress_t* pProgress); |
80 |
protected: |
protected: |
81 |
virtual ::gig::Instrument* Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg); |
virtual ::gig::Instrument* Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg); |
82 |
virtual void Destroy(::gig::Instrument* pResource, void* pArg); |
virtual void Destroy(::gig::Instrument* pResource, void* pArg); |