/[svn]/linuxsampler/trunk/src/drivers/midi/MidiInputDeviceAlsa.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/midi/MidiInputDeviceAlsa.cpp

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

revision 1247 by schoenebeck, Mon Nov 27 21:34:55 2006 UTC revision 1248 by persson, Fri Jun 22 10:10:06 2007 UTC
# Line 130  namespace LinuxSampler { Line 130  namespace LinuxSampler {
130          if (alsaPort < 0) throw MidiInputException("Error creating sequencer port");          if (alsaPort < 0) throw MidiInputException("Error creating sequencer port");
131          this->portNumber = alsaPort;          this->portNumber = alsaPort;
132    
133            delete Parameters["NAME"];
134          Parameters["NAME"]              = new ParameterName(this);          Parameters["NAME"]              = new ParameterName(this);
135          Parameters["ALSA_SEQ_BINDINGS"] = new ParameterAlsaSeqBindings(this);          Parameters["ALSA_SEQ_BINDINGS"] = new ParameterAlsaSeqBindings(this);
136          Parameters["ALSA_SEQ_ID"]       = new ParameterAlsaSeqId(this);          Parameters["ALSA_SEQ_ID"]       = new ParameterAlsaSeqId(this);
# Line 184  namespace LinuxSampler { Line 185  namespace LinuxSampler {
185      }      }
186    
187      MidiInputDeviceAlsa::~MidiInputDeviceAlsa() {      MidiInputDeviceAlsa::~MidiInputDeviceAlsa() {
188              snd_seq_close(hAlsaSeq);          // free the midi ports (we can't let the base class do this,
189            // as the MidiInputPortAlsa destructors need access to
190            // hAlsaSeq)
191            for (std::map<int,MidiInputPort*>::iterator iter = Ports.begin(); iter != Ports.end() ; iter++) {
192                delete static_cast<MidiInputPortAlsa*>(iter->second);
193            }
194            Ports.clear();
195    
196            snd_seq_close(hAlsaSeq);
197      }      }
198    
199      MidiInputDeviceAlsa::MidiInputPortAlsa* MidiInputDeviceAlsa::CreateMidiPort() {      MidiInputDeviceAlsa::MidiInputPortAlsa* MidiInputDeviceAlsa::CreateMidiPort() {
# Line 212  namespace LinuxSampler { Line 221  namespace LinuxSampler {
221      }      }
222    
223      String MidiInputDeviceAlsa::Version() {      String MidiInputDeviceAlsa::Version() {
224              String s = "$Revision: 1.18 $";              String s = "$Revision: 1.19 $";
225              return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword              return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
226      }      }
227    

Legend:
Removed from v.1247  
changed lines
  Added in v.1248

  ViewVC Help
Powered by ViewVC