/[svn]/linuxsampler/trunk/src/drivers/audio/AudioOutputDevicePlugin.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/audio/AudioOutputDevicePlugin.cpp

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

revision 3053 by schoenebeck, Wed Jan 1 17:48:01 2014 UTC revision 3054 by schoenebeck, Thu Dec 15 12:47:45 2016 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2008 - 2012 Andreas Persson                             *   *   Copyright (C) 2008 - 2016 Andreas Persson and Christian Schoenebeck   *
4   *                                                                         *   *                                                                         *
5   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
6   *   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 157  namespace LinuxSampler { Line 157  namespace LinuxSampler {
157    
158      void AudioOutputDevicePlugin::AddChannels(int newChannels) {      void AudioOutputDevicePlugin::AddChannels(int newChannels) {
159          static_cast<ParameterChannelsPlugin*>(          static_cast<ParameterChannelsPlugin*>(
160              Parameters["CHANNELS"])->ForceSetValue(Channels.size() + newChannels);              Parameters["CHANNELS"])->ForceSetValue(int(Channels.size() + newChannels));
161      }      }
162    
163      void AudioOutputDevicePlugin::RemoveChannel(AudioChannel* pChannel) {      void AudioOutputDevicePlugin::RemoveChannel(AudioChannel* pChannel) {
164          std::vector<AudioChannel*>::iterator i = find(Channels.begin(), Channels.end(), pChannel);          std::vector<AudioChannel*>::iterator i = find(Channels.begin(), Channels.end(), pChannel);
165          int channelNumber = i - Channels.begin();          int channelNumber = int(i - Channels.begin());
166          delete *i;          delete *i;
167          Channels.erase(i);          Channels.erase(i);
168    
# Line 171  namespace LinuxSampler { Line 171  namespace LinuxSampler {
171              Channels[channelNumber]->ChannelParameters()["NAME"]->SetValue("Channel " + ToString(channelNumber));              Channels[channelNumber]->ChannelParameters()["NAME"]->SetValue("Channel " + ToString(channelNumber));
172          }          }
173          static_cast<ParameterChannelsPlugin*>(          static_cast<ParameterChannelsPlugin*>(
174              Parameters["CHANNELS"])->ForceSetValue(Channels.size());              Parameters["CHANNELS"])->ForceSetValue(int(Channels.size()));
175      }      }
176  }  }

Legend:
Removed from v.3053  
changed lines
  Added in v.3054

  ViewVC Help
Powered by ViewVC