/[svn]/linuxsampler/trunk/src/engines/sf2/InstrumentResourceManager.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sf2/InstrumentResourceManager.cpp

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

revision 2027 by iliev, Tue Nov 3 19:27:42 2009 UTC revision 2185 by persson, Sun Jun 19 09:09:38 2011 UTC
# Line 4  Line 4 
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 - 2009 Christian Schoenebeck                       *
7   *   Copyright (C) 2009 Grigor Iliev                                       *   *   Copyright (C) 2009 - 2011 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  *
# Line 148  namespace LinuxSampler { namespace sf2 { Line 148  namespace LinuxSampler { namespace sf2 {
148    
149      ::sf2::Preset* InstrumentResourceManager::Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg) {      ::sf2::Preset* InstrumentResourceManager::Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg) {
150          // get sfz file from internal sfz file manager          // get sfz file from internal sfz file manager
151          ::sf2::File* pSf2 = Sf2s.Borrow(Key.FileName, (Sf2Consumer*) Key.Index); // conversion kinda hackish :/          ::sf2::File* pSf2 = Sf2s.Borrow(Key.FileName, reinterpret_cast<Sf2Consumer*>(Key.Index)); // conversion kinda hackish :/
152    
153          dmsg(1,("Loading sf2 instrument ('%s',%d)...",Key.FileName.c_str(),Key.Index));          dmsg(1,("Loading sf2 instrument ('%s',%d)...",Key.FileName.c_str(),Key.Index));
154          ::sf2::Preset* pInstrument = GetSfInstrument(pSf2, Key.Index);          ::sf2::Preset* pInstrument = GetSfInstrument(pSf2, Key.Index);
# Line 196  namespace LinuxSampler { namespace sf2 { Line 196  namespace LinuxSampler { namespace sf2 {
196      void InstrumentResourceManager::Destroy( ::sf2::Preset* pResource, void* pArg) {      void InstrumentResourceManager::Destroy( ::sf2::Preset* pResource, void* pArg) {
197          instr_entry_t* pEntry = (instr_entry_t*) pArg;          instr_entry_t* pEntry = (instr_entry_t*) pArg;
198          // we don't need the .sf2 file here anymore          // we don't need the .sf2 file here anymore
199          Sf2s.HandBack(pEntry->pSf2, (Sf2Consumer*) pEntry->ID.Index); // conversion kinda hackish :/          Sf2s.HandBack(pEntry->pSf2, reinterpret_cast<Sf2Consumer*>(pEntry->ID.Index)); // conversion kinda hackish :/
200          delete pEntry;          delete pEntry;
201      }      }
202    

Legend:
Removed from v.2027  
changed lines
  Added in v.2185

  ViewVC Help
Powered by ViewVC