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 - 2009 Christian Schoenebeck * |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
7 |
* Copyright (C) 2009 Grigor Iliev * |
* Copyright (C) 2009 - 2012 Christian Schoenebeck and Grigor Iliev * |
8 |
* * |
* * |
9 |
* This program is free software; you can redistribute it and/or modify * |
* 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 * |
* it under the terms of the GNU General Public License as published by * |
60 |
* instrument / file is not needed anymore, then it will be freed from |
* instrument / file is not needed anymore, then it will be freed from |
61 |
* memory. |
* memory. |
62 |
*/ |
*/ |
63 |
class InstrumentResourceManager : public InstrumentManagerDefaultImpl< ::sfz::File, ::sfz::Instrument, ::sfz::Region, Sample> { |
class InstrumentResourceManager : public InstrumentManagerBase< ::sfz::File, ::sfz::Instrument, ::sfz::Region, Sample> { |
64 |
public: |
public: |
65 |
InstrumentResourceManager() : Sfzs(this) {} |
InstrumentResourceManager() : Sfzs(this) {} |
66 |
virtual ~InstrumentResourceManager() {} |
virtual ~InstrumentResourceManager() {} |
67 |
|
|
68 |
// implementation of derived abstract methods from 'InstrumentManager' |
// implementation of derived abstract methods from 'InstrumentManager' |
|
virtual std::vector<instrument_id_t> Instruments(); |
|
69 |
virtual String GetInstrumentName(instrument_id_t ID); |
virtual String GetInstrumentName(instrument_id_t ID); |
70 |
virtual std::vector<instrument_id_t> GetInstrumentFileContent(String File) throw (InstrumentManagerException); |
virtual std::vector<instrument_id_t> GetInstrumentFileContent(String File) throw (InstrumentManagerException); |
71 |
virtual instrument_info_t GetInstrumentInfo(instrument_id_t ID) throw (InstrumentManagerException); |
virtual instrument_info_t GetInstrumentInfo(instrument_id_t ID) throw (InstrumentManagerException); |
76 |
// implementation of derived abstract methods from 'ResourceManager' |
// implementation of derived abstract methods from 'ResourceManager' |
77 |
virtual ::sfz::Instrument* Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg); |
virtual ::sfz::Instrument* Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg); |
78 |
virtual void Destroy(::sfz::Instrument* pResource, void* pArg); |
virtual void Destroy(::sfz::Instrument* pResource, void* pArg); |
|
virtual void OnBorrow(::sfz::Instrument* pResource, InstrumentConsumer* pConsumer, void*& pArg); |
|
79 |
virtual void DeleteRegionIfNotUsed(::sfz::Region* pRegion, region_info_t* pRegInfo); |
virtual void DeleteRegionIfNotUsed(::sfz::Region* pRegion, region_info_t* pRegInfo); |
80 |
virtual void DeleteSampleIfNotUsed(Sample* pSample, region_info_t* pRegInfo); |
virtual void DeleteSampleIfNotUsed(Sample* pSample, region_info_t* pRegInfo); |
81 |
private: |
private: |