/[svn]/linuxsampler/trunk/src/drivers/midi/MidiInputDeviceCoreMidi.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/midi/MidiInputDeviceCoreMidi.h

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

revision 1424 by schoenebeck, Sun Oct 14 22:00:17 2007 UTC revision 2370 by schoenebeck, Wed Sep 19 13:11:45 2012 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2004, 2005 Grame                                        *   *   Copyright (C) 2004, 2005 Grame                                        *
4   *   Copyright (C) 2007 Christian Schoenebeck                              *   *   Copyright (C) 2005 - 2012 Christian Schoenebeck                       *
5   *                                                                         *   *                                                                         *
6   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
7   *   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 66  namespace LinuxSampler { Line 66  namespace LinuxSampler {
66                          protected:                          protected:
67                              MidiInputPortCoreMidi* pPort;                              MidiInputPortCoreMidi* pPort;
68                      };                      };
69                                    
70                                            /** MIDI Port Parameter 'AUTO_BIND'
71                                             *
72                                             * If enabled, the port will automatically be connected to all
73                                             * CoreMIDI source endpoints at present and future.
74                                             */
75                                            class ParameterAutoBind : public DeviceRuntimeParameterBool {
76                                                    public:
77                                                            ParameterAutoBind(MidiInputPortCoreMidi* pPort);
78                                                            virtual String Description();
79                                                            virtual bool Fix();
80                                                            virtual void OnSetValue(bool b) throw (Exception);
81                                                    protected:
82                                                            MidiInputPortCoreMidi* pPort;
83                                            };
84                                    
85                                            void ProcessMidiEvents(const MIDIPacketList *pktlist);
86    
87                                          static void ReadProc(const MIDIPacketList *pktlist, void *refCon, void *connRefCon);                                          static void ReadProc(const MIDIPacketList *pktlist, void *refCon, void *connRefCon);
88                                          static int pPortID;                                          static int pPortID;
# Line 73  namespace LinuxSampler { Line 90  namespace LinuxSampler {
90                  protected:                  protected:
91                      MidiInputPortCoreMidi(MidiInputDeviceCoreMidi* pDevice) throw (MidiInputException);                      MidiInputPortCoreMidi(MidiInputDeviceCoreMidi* pDevice) throw (MidiInputException);
92                      ~MidiInputPortCoreMidi();                      ~MidiInputPortCoreMidi();
93                                            void connectToSource(MIDIEndpointRef source);
94                                            void connectToAllSources();
95                                            void onNewSourceAppeared(MIDIEndpointRef source);
96                                            void onNewSourceDisappeared(MIDIEndpointRef source);
97                      friend class MidiInputDeviceCoreMidi;                      friend class MidiInputDeviceCoreMidi;
98                  private:                  private:
99                      MidiInputPortCoreMidi* pDevice;                      MidiInputDeviceCoreMidi* pDevice;
100                                          MIDIEndpointRef pDestination;                                          MIDIEndpointRef pDestination;
101                                            std::vector<MIDIEndpointRef> bindings; //TODO: shall probably be protected by a mutex (since the CoreMIDI notification callback thread might also modify it when new sources appear or disappear)
102    
103                      friend class ParameterName;                      friend class ParameterName;
104                      friend class ParameterCoreMidiBindings;                      friend class ParameterCoreMidiBindings;
# Line 100  namespace LinuxSampler { Line 122  namespace LinuxSampler {
122    
123          private:          private:
124                          MIDIClientRef   hCoreMidiClient;                          MIDIClientRef   hCoreMidiClient;
125                            MIDIPortRef pBridge;
126      };      };
127  }  }
128    

Legend:
Removed from v.1424  
changed lines
  Added in v.2370

  ViewVC Help
Powered by ViewVC