/[svn]/linuxsampler/trunk/src/engines/gig/InstrumentResourceManager.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/InstrumentResourceManager.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 53 by schoenebeck, Mon Apr 26 17:15:51 2004 UTC revision 386 by letz, Thu Feb 17 10:45:30 2005 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003 by Benno Senoner and Christian Schoenebeck         *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *                                                                         *   *                                                                         *
7   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
8   *   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  *
# Line 32  Line 32 
32  #include "../../common/global.h"  #include "../../common/global.h"
33  #include "../../common/LinuxSamplerException.h"  #include "../../common/LinuxSamplerException.h"
34  #include "../../common/ResourceManager.h"  #include "../../common/ResourceManager.h"
35  #include "../../audiodriver/AudioOutputDevice.h"  #include "../../drivers/audio/AudioOutputDevice.h"
36  #include "../../lib/fileloader/libgig/gig.h"  #include "../../lib/fileloader/libgig/gig.h"
37    
38  // preload 64k samples = 128kB of data in RAM for 16 bit mono samples  // preload 64k samples = 128kB of data in RAM for 16 bit mono samples
# Line 77  namespace LinuxSampler { namespace gig { Line 77  namespace LinuxSampler { namespace gig {
77       * in use by any engine anymore, then it will be freed from memory.       * in use by any engine anymore, then it will be freed from memory.
78       */       */
79      class InstrumentResourceManager : public ResourceManager<instrument_id_t, ::gig::Instrument> {      class InstrumentResourceManager : public ResourceManager<instrument_id_t, ::gig::Instrument> {
80                    public:
81                            virtual ~InstrumentResourceManager() {}
82          protected:          protected:
83              virtual ::gig::Instrument* Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg);              virtual ::gig::Instrument* Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg);
84              virtual void               Destroy(::gig::Instrument* pResource, void* pArg);              virtual void               Destroy(::gig::Instrument* pResource, void* pArg);
# Line 95  namespace LinuxSampler { namespace gig { Line 97  namespace LinuxSampler { namespace gig {
97                      virtual ::gig::File* Create(String Key, GigConsumer* pConsumer, void*& pArg);                      virtual ::gig::File* Create(String Key, GigConsumer* pConsumer, void*& pArg);
98                      virtual void         Destroy(::gig::File* pResource, void* pArg);                      virtual void         Destroy(::gig::File* pResource, void* pArg);
99                      virtual void         OnBorrow(::gig::File* pResource, GigConsumer* pConsumer, void*& pArg) {} // ignore                      virtual void         OnBorrow(::gig::File* pResource, GigConsumer* pConsumer, void*& pArg) {} // ignore
100                                    public:
101                                            virtual ~GigResourceManager() {}
102              } Gigs;              } Gigs;
103    
104              void CacheInitialSamples(::gig::Sample* pSample, gig::Engine* pEngine);              void CacheInitialSamples(::gig::Sample* pSample, gig::Engine* pEngine);

Legend:
Removed from v.53  
changed lines
  Added in v.386

  ViewVC Help
Powered by ViewVC