/[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 221 by schoenebeck, Fri Aug 20 17:25:19 2004 UTC revision 226 by schoenebeck, Wed Aug 25 22:00:33 2004 UTC
# Line 23  Line 23 
23  #include "MidiInputDeviceAlsa.h"  #include "MidiInputDeviceAlsa.h"
24  #include "MidiInputDeviceFactory.h"  #include "MidiInputDeviceFactory.h"
25    
26    #define perm_ok(pinfo,bits) ((snd_seq_port_info_get_capability(pinfo) & (bits)) == (bits))
27    
28  namespace LinuxSampler {  namespace LinuxSampler {
29    
30      REGISTER_MIDI_INPUT_DRIVER(MidiInputDeviceAlsa);      REGISTER_MIDI_INPUT_DRIVER(MidiInputDeviceAlsa);
# Line 68  namespace LinuxSampler { Line 70  namespace LinuxSampler {
70      }      }
71    
72      std::vector<String> MidiInputDeviceAlsa::MidiInputPortAlsa::ParameterAlsaSeqBindings::PossibilitiesAsString() {      std::vector<String> MidiInputDeviceAlsa::MidiInputPortAlsa::ParameterAlsaSeqBindings::PossibilitiesAsString() {
73          return std::vector<String>(); //TODO          std::vector<String> res;
74            snd_seq_client_info_t* cinfo;
75            snd_seq_port_info_t* pinfo;
76    
77            snd_seq_client_info_alloca(&cinfo);
78            snd_seq_port_info_alloca(&pinfo);
79            snd_seq_client_info_set_client(cinfo, -1);
80            while (snd_seq_query_next_client(pPort->pDevice->hAlsaSeq, cinfo) >= 0) {
81                snd_seq_port_info_set_client(pinfo, snd_seq_client_info_get_client(cinfo));
82                snd_seq_port_info_set_port(pinfo, -1);
83                while (snd_seq_query_next_port(pPort->pDevice->hAlsaSeq, pinfo) >= 0) {
84                    if (perm_ok(pinfo, SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ)) {
85                            String seq_id = ToString(snd_seq_client_info_get_client(cinfo)) + ":" +
86                                            ToString(snd_seq_port_info_get_port(pinfo));
87                            res.push_back(seq_id);
88                    }
89                }
90            }
91    
92            return res;
93      }      }
94    
95      void MidiInputDeviceAlsa::MidiInputPortAlsa::ParameterAlsaSeqBindings::OnSetValue(std::vector<String> vS) throw (LinuxSamplerException) {      void MidiInputDeviceAlsa::MidiInputPortAlsa::ParameterAlsaSeqBindings::OnSetValue(std::vector<String> vS) throw (LinuxSamplerException) {
# Line 172  namespace LinuxSampler { Line 193  namespace LinuxSampler {
193      }      }
194    
195      String MidiInputDeviceAlsa::Version() {      String MidiInputDeviceAlsa::Version() {
196              String s = "$Revision: 1.9 $";              String s = "$Revision: 1.10 $";
197              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
198      }      }
199    

Legend:
Removed from v.221  
changed lines
  Added in v.226

  ViewVC Help
Powered by ViewVC