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

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

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

revision 2426 by persson, Sun Mar 1 16:33:22 2009 UTC revision 2427 by persson, Sat Mar 2 07:03:04 2013 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 - 2009 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2013 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 35  namespace LinuxSampler { Line 35  namespace LinuxSampler {
35      Mutex loaderMutex;      Mutex loaderMutex;
36    
37      void InstrumentManager::LoadInstrumentInBackground(InstrumentManager::instrument_id_t ID, EngineChannel* pEngineChannel) {      void InstrumentManager::LoadInstrumentInBackground(InstrumentManager::instrument_id_t ID, EngineChannel* pEngineChannel) {
38          loaderMutex.Lock();          LockGuard lock(loaderMutex);
39          thread.StartNewLoad(ID.FileName, ID.Index, pEngineChannel);          thread.StartNewLoad(ID.FileName, ID.Index, pEngineChannel);
         loaderMutex.Unlock();  
40      }      }
41    
42      void InstrumentManager::SetModeInBackground(const instrument_id_t& ID, mode_t Mode) {      void InstrumentManager::SetModeInBackground(const instrument_id_t& ID, mode_t Mode) {
43          loaderMutex.Lock();          LockGuard lock(loaderMutex);
44          thread.StartSettingMode(this, ID, Mode);          thread.StartSettingMode(this, ID, Mode);
         loaderMutex.Unlock();  
45      }      }
46    
47      void InstrumentManager::StopBackgroundThread() {      void InstrumentManager::StopBackgroundThread() {

Legend:
Removed from v.2426  
changed lines
  Added in v.2427

  ViewVC Help
Powered by ViewVC