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 - 2007 Christian Schoenebeck * |
* Copyright (C) 2005 - 2008 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 * |
32 |
#include "../../common/ResourceManager.h" |
#include "../../common/ResourceManager.h" |
33 |
#include "../../drivers/audio/AudioOutputDevice.h" |
#include "../../drivers/audio/AudioOutputDevice.h" |
34 |
#include "../InstrumentManager.h" |
#include "../InstrumentManager.h" |
35 |
|
#include "../../common/ArrayList.h" |
36 |
|
|
37 |
//namespace libgig = gig; |
//namespace libgig = gig; |
38 |
|
|
89 |
virtual void OnSampleReferenceChanged(void* pOldSample, void* pNewSample, InstrumentEditor* pSender); |
virtual void OnSampleReferenceChanged(void* pOldSample, void* pNewSample, InstrumentEditor* pSender); |
90 |
|
|
91 |
void HandBackInstrument(::gig::Instrument* pResource, InstrumentConsumer* pConsumer, |
void HandBackInstrument(::gig::Instrument* pResource, InstrumentConsumer* pConsumer, |
92 |
::gig::DimensionRegion** dimRegionsInUse); |
RTList< ::gig::DimensionRegion*>* pDimRegionsInUse); |
93 |
void HandBackDimReg(::gig::DimensionRegion* pDimReg); |
void HandBackDimReg(::gig::DimensionRegion* pDimReg); |
94 |
|
|
95 |
|
void TrySendNoteOnToEditors(uint8_t Key, uint8_t Velocity, ::gig::Instrument* pInstrument); |
96 |
|
void TrySendNoteOffToEditors(uint8_t Key, uint8_t Velocity, ::gig::Instrument* pInstrument); |
97 |
|
|
98 |
protected: |
protected: |
99 |
// implementation of derived abstract methods from 'ResourceManager' |
// implementation of derived abstract methods from 'ResourceManager' |
100 |
virtual ::gig::Instrument* Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg); |
virtual ::gig::Instrument* Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg); |
137 |
std::map< ::gig::Sample*, int> SampleRefCount; ///< contains samples that are still in use but belong to a released instrument |
std::map< ::gig::Sample*, int> SampleRefCount; ///< contains samples that are still in use but belong to a released instrument |
138 |
|
|
139 |
Mutex InstrumentEditorProxiesMutex; ///< protects the 'InstrumentEditorProxies' map |
Mutex InstrumentEditorProxiesMutex; ///< protects the 'InstrumentEditorProxies' map |
140 |
std::map<InstrumentEditor*, InstrumentConsumer*> InstrumentEditorProxies; ///< here we store the objects that react on instrument specific notifications on behalf of the respective instrument editor |
ArrayList<InstrumentConsumer*> InstrumentEditorProxies; ///< here we store the objects that react on instrument specific notifications on behalf of the respective instrument editor |
141 |
std::set<Engine*> suspendedEngines; ///< all engines currently completely suspended |
std::set<Engine*> suspendedEngines; ///< all engines currently completely suspended |
142 |
Mutex suspendedEnginesMutex; ///< protects 'suspendedEngines' set |
Mutex suspendedEnginesMutex; ///< protects 'suspendedEngines' set |
143 |
}; |
}; |