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

Diff of /linuxsampler/trunk/src/engines/InstrumentManager.h

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

revision 958 by schoenebeck, Wed Nov 29 19:48:38 2006 UTC revision 1525 by schoenebeck, Sun Nov 25 17:47:46 2007 UTC
# Line 3  Line 3 
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, 2006 Christian Schoenebeck                        *   *   Copyright (C) 2005 - 2007 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This library is free software; you can redistribute it and/or modify  *   *   This library 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  *
# Line 25  Line 25 
25  #define __LS_INSTRUMENTMANAGER_H__  #define __LS_INSTRUMENTMANAGER_H__
26    
27  #include "../common/global.h"  #include "../common/global.h"
28    #include "../common/Exception.h"
29    
30  #include <vector>  #include <vector>
31    
# Line 33  namespace LinuxSampler { Line 34  namespace LinuxSampler {
34      // just symbol prototyping      // just symbol prototyping
35      class EngineChannel;      class EngineChannel;
36    
37        /**
38         * Will be thrown by InstrumentManager implementations on errors.
39         */
40        class InstrumentManagerException : public Exception {
41            public:
42                InstrumentManagerException(String msg) : Exception(msg) {}
43        };
44    
45      /** @brief Abstract interface class for InstrumentManagers.      /** @brief Abstract interface class for InstrumentManagers.
46       *       *
47       * Sampler engines should provide an InstrumentManager for allowing       * Sampler engines should provide an InstrumentManager for allowing
# Line 64  namespace LinuxSampler { Line 73  namespace LinuxSampler {
73              };              };
74    
75              /**              /**
76                 * Rather abstract informations about an instrument.
77                 */
78                struct instrument_info_t {
79                    String InstrumentName;
80                    String FormatVersion;
81                    String Product;
82                    String Artists;
83                };
84    
85                /**
86               * Returns all managed instruments.               * Returns all managed instruments.
87               *               *
88               * This method has to be implemented by the descendant.               * This method has to be implemented by the descendant.
# Line 110  namespace LinuxSampler { Line 129  namespace LinuxSampler {
129               * This method has to be implemented by the descendant.               * This method has to be implemented by the descendant.
130               */               */
131              virtual String GetInstrumentName(instrument_id_t ID) = 0;              virtual String GetInstrumentName(instrument_id_t ID) = 0;
132    
133                /**
134                 * Returns a textual identifier of the data structure for the
135                 * given loaded instrument, which usually reflects the name of
136                 * of the library used to load the instrument (i.e. "libgig").
137                 *
138                 * This method has to be implemented by the descendant.
139                 */
140                virtual String GetInstrumentDataStructureName(instrument_id_t ID) = 0;
141    
142                /**
143                 * Returns the version of the data structure for the given
144                 * loaded instrument, which usually reflects the version of the
145                 * library which was used to load the instrument (i.e. "3.1.0").
146                 *
147                 * This method has to be implemented by the descendant.
148                 */
149                virtual String GetInstrumentDataStructureVersion(instrument_id_t ID) = 0;
150    
151                /**
152                 * Spawn an appropriate editor for the given instrument that is
153                 * actually capable to handle the instrument's format and data
154                 * structure. The instrument editor will be hosted in the
155                 * sampler's own process to allow immediate live-editing of the
156                 * instrument while playing the instrument in parallel by the
157                 * sampler.
158                 *
159                 * For this to work, instrument editor applications have to
160                 * implement the abstract interface class @c InstrumentEditor
161                 * and have to generate a plugin DLL that has to be placed into
162                 * the appropriate plugin directory of the sampler.
163                 *
164                 * This method has to be implemented by the descendant.
165                 *
166                 * @throws InstrumentManagerException - in case no compatible
167                 *         instrument editor is registered to the sampler
168                 */
169                virtual void LaunchInstrumentEditor(instrument_id_t ID) throw (InstrumentManagerException) = 0;
170    
171                /**
172                 * Returns a list of instrument IDs of the provided instrument
173                 * file in case the provided file's format is supported.
174                 *
175                 * @throws InstrumentManagerException if the format of the
176                 *         provided instrument file is not supported
177                 */
178                virtual std::vector<instrument_id_t> GetInstrumentFileContent(String File) throw (InstrumentManagerException) = 0;
179    
180                /**
181                 * Get detailed informations about the provided instrument file.
182                 *
183                 * @throws InstrumentManagerException if the format of the
184                 *         provided instrument file is not supported
185                 */
186                virtual instrument_info_t GetInstrumentInfo(instrument_id_t ID) throw (InstrumentManagerException) = 0;
187      };      };
188    
189  };  }
190    
191  #endif // __LS_INSTRUMENTMANAGER_H__  #endif // __LS_INSTRUMENTMANAGER_H__

Legend:
Removed from v.958  
changed lines
  Added in v.1525

  ViewVC Help
Powered by ViewVC