/[svn]/linuxsampler/trunk/src/Sampler.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/Sampler.cpp

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

revision 2500 by schoenebeck, Fri Jan 10 12:20:05 2014 UTC revision 3054 by schoenebeck, Thu Dec 15 12:47:45 2016 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 - 2014 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2016 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 175  namespace LinuxSampler { Line 175  namespace LinuxSampler {
175              pEngineChannel->Connect(pPort);              pEngineChannel->Connect(pPort);
176          } else { // no engine channel yet, remember it for future connection ...          } else { // no engine channel yet, remember it for future connection ...
177              const midi_conn_t c = {              const midi_conn_t c = {
178                  pPort->GetDevice()->MidiInputDeviceID(),                  static_cast<uint>(pPort->GetDevice()->MidiInputDeviceID()),
179                  pPort->GetPortNumber()                  pPort->GetPortNumber()
180              };              };
181              this->vMidiInputs.push_back(c);              this->vMidiInputs.push_back(c);
# Line 195  namespace LinuxSampler { Line 195  namespace LinuxSampler {
195              pEngineChannel->Disconnect(pPort);              pEngineChannel->Disconnect(pPort);
196          } else { // no engine channel yet, forget it regarding future connection ...          } else { // no engine channel yet, forget it regarding future connection ...
197              const midi_conn_t c = {              const midi_conn_t c = {
198                  pPort->GetDevice()->MidiInputDeviceID(),                  static_cast<uint>(pPort->GetDevice()->MidiInputDeviceID()),
199                  pPort->GetPortNumber()                  pPort->GetPortNumber()
200              };              };
201              for (int i = this->vMidiInputs.size() - 1; i >= 0; --i) {              for (ssize_t i = this->vMidiInputs.size() - 1; i >= 0; --i) {
202                  if (this->vMidiInputs[i] == c)                  if (this->vMidiInputs[i] == c)
203                      this->vMidiInputs.erase(this->vMidiInputs.begin() + i);                      this->vMidiInputs.erase(this->vMidiInputs.begin() + i);
204                  // no break or return here, for safety reasons                  // no break or return here, for safety reasons
# Line 270  namespace LinuxSampler { Line 270  namespace LinuxSampler {
270              this->vMidiInputs.clear();              this->vMidiInputs.clear();
271              // store the new connection (alone)              // store the new connection (alone)
272              const midi_conn_t c = {              const midi_conn_t c = {
273                  pNewPort->GetDevice()->MidiInputDeviceID(),                  static_cast<uint>(pNewPort->GetDevice()->MidiInputDeviceID()),
274                  pNewPort->GetPortNumber()                  pNewPort->GetPortNumber()
275              };              };
276              this->vMidiInputs.push_back(c);              this->vMidiInputs.push_back(c);
# Line 379  namespace LinuxSampler { Line 379  namespace LinuxSampler {
379      }      }
380    
381      uint Sampler::SamplerChannels() {      uint Sampler::SamplerChannels() {
382          return mSamplerChannels.size();          return (uint) mSamplerChannels.size();
383      }      }
384    
385      void Sampler::AddChannelCountListener(ChannelCountListener* l) {      void Sampler::AddChannelCountListener(ChannelCountListener* l) {
# Line 672  namespace LinuxSampler { Line 672  namespace LinuxSampler {
672      }      }
673    
674      uint Sampler::AudioOutputDevices() {      uint Sampler::AudioOutputDevices() {
675          return AudioOutputDeviceFactory::Devices().size();          return (uint) AudioOutputDeviceFactory::Devices().size();
676      }      }
677    
678      uint Sampler::MidiInputDevices() {      uint Sampler::MidiInputDevices() {
679          return MidiInputDeviceFactory::Devices().size();          return (uint) MidiInputDeviceFactory::Devices().size();
680      }      }
681    
682      std::map<uint, AudioOutputDevice*> Sampler::GetAudioOutputDevices() {      std::map<uint, AudioOutputDevice*> Sampler::GetAudioOutputDevices() {

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

  ViewVC Help
Powered by ViewVC