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 * |
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 |
|
|
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 |
} |
} |