| 
																	
																	
																		
																	
																	
																 | 
																@@ -209,10 +209,9 @@ public: | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    //==============================================================================
 | 
																 | 
																 | 
																    //==============================================================================
 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Returns the current device properties that are in use.
 | 
																 | 
																 | 
																    /** Returns the current device properties that are in use.
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        @see setAudioDeviceSetup
 | 
																 | 
																 | 
																        @see setAudioDeviceSetup
 | 
															
														
														
													
														
															
																 | 
																 | 
																    */
 | 
																 | 
																 | 
																    */
 | 
															
														
														
													
														
															
																 | 
																 | 
																    void getAudioDeviceSetup (AudioDeviceSetup& setup);
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    void getAudioDeviceSetup (AudioDeviceSetup& result);
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Changes the current device or its settings.
 | 
																 | 
																 | 
																    /** Changes the current device or its settings.
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -261,9 +260,7 @@ public: | 
															
														
														
													
														
															
																 | 
																 | 
																    void setCurrentAudioDeviceType (const String& type,
 | 
																 | 
																 | 
																    void setCurrentAudioDeviceType (const String& type,
 | 
															
														
														
													
														
															
																 | 
																 | 
																                                    bool treatAsChosenDevice);
 | 
																 | 
																 | 
																                                    bool treatAsChosenDevice);
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Closes the currently-open device.
 | 
																 | 
																 | 
																    /** Closes the currently-open device.
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        You can call restartLastAudioDevice() later to reopen it in the same state
 | 
																 | 
																 | 
																        You can call restartLastAudioDevice() later to reopen it in the same state
 | 
															
														
														
													
														
															
																 | 
																 | 
																        that it was just in.
 | 
																 | 
																 | 
																        that it was just in.
 | 
															
														
														
													
														
															
																 | 
																 | 
																    */
 | 
																 | 
																 | 
																    */
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -305,8 +302,8 @@ public: | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    //==============================================================================
 | 
																 | 
																 | 
																    //==============================================================================
 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Returns the average proportion of available CPU being spent inside the audio callbacks.
 | 
																 | 
																 | 
																    /** Returns the average proportion of available CPU being spent inside the audio callbacks.
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        Returns a value between 0 and 1.0
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        @returns  A value between 0 and 1.0 to indicate the approximate proportion of CPU
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                  time spent in the callbacks.
 | 
															
														
														
													
														
															
																 | 
																 | 
																    */
 | 
																 | 
																 | 
																    */
 | 
															
														
														
													
														
															
																 | 
																 | 
																    double getCpuUsage() const;
 | 
																 | 
																 | 
																    double getCpuUsage() const;
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -333,16 +330,16 @@ public: | 
															
														
														
													
														
															
																 | 
																 | 
																    void setMidiInputEnabled (const String& midiInputDeviceName, bool enabled);
 | 
																 | 
																 | 
																    void setMidiInputEnabled (const String& midiInputDeviceName, bool enabled);
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Returns true if a given midi input device is being used.
 | 
																 | 
																 | 
																    /** Returns true if a given midi input device is being used.
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        @see setMidiInputEnabled
 | 
																 | 
																 | 
																        @see setMidiInputEnabled
 | 
															
														
														
													
														
															
																 | 
																 | 
																    */
 | 
																 | 
																 | 
																    */
 | 
															
														
														
													
														
															
																 | 
																 | 
																    bool isMidiInputEnabled (const String& midiInputDeviceName) const;
 | 
																 | 
																 | 
																    bool isMidiInputEnabled (const String& midiInputDeviceName) const;
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Registers a listener for callbacks when midi events arrive from a midi input.
 | 
																 | 
																 | 
																    /** Registers a listener for callbacks when midi events arrive from a midi input.
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																        The device name can be empty to indicate that it wants events from whatever the
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        current "default" device is. Or it can be the name of one of the midi input devices
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        (see MidiInput::getDevices() for the names).
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        The device name can be empty to indicate that it wants to receive all incoming
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        events from all the enabled MIDI inputs. Or it can be the name of one of the
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        MIDI input devices if it just wants the events from that device. (see
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        MidiInput::getDevices() for the list of device names).
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																        Only devices which are enabled (see the setMidiInputEnabled() method) will have their
 | 
																 | 
																 | 
																        Only devices which are enabled (see the setMidiInputEnabled() method) will have their
 | 
															
														
														
													
														
															
																 | 
																 | 
																        events forwarded on to listeners.
 | 
																 | 
																 | 
																        events forwarded on to listeners.
 | 
															
														
														
													
												
													
														
															
																| 
																	
																	
																	
																		
																	
																 | 
																@@ -350,8 +347,7 @@ public: | 
															
														
														
													
														
															
																 | 
																 | 
																    void addMidiInputCallback (const String& midiInputDeviceName,
 | 
																 | 
																 | 
																    void addMidiInputCallback (const String& midiInputDeviceName,
 | 
															
														
														
													
														
															
																 | 
																 | 
																                               MidiInputCallback* callback);
 | 
																 | 
																 | 
																                               MidiInputCallback* callback);
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Removes a listener that was previously registered with addMidiInputCallback().
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    */
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    /** Removes a listener that was previously registered with addMidiInputCallback(). */
 | 
															
														
														
													
														
															
																 | 
																 | 
																    void removeMidiInputCallback (const String& midiInputDeviceName,
 | 
																 | 
																 | 
																    void removeMidiInputCallback (const String& midiInputDeviceName,
 | 
															
														
														
													
														
															
																 | 
																 | 
																                                  MidiInputCallback* callback);
 | 
																 | 
																 | 
																                                  MidiInputCallback* callback);
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
												
													
														
															
																| 
																	
																	
																	
																		
																	
																 | 
																@@ -371,22 +367,17 @@ public: | 
															
														
														
													
														
															
																 | 
																 | 
																    void setDefaultMidiOutput (const String& deviceName);
 | 
																 | 
																 | 
																    void setDefaultMidiOutput (const String& deviceName);
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Returns the name of the default midi output.
 | 
																 | 
																 | 
																    /** Returns the name of the default midi output.
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        @see setDefaultMidiOutput, getDefaultMidiOutput
 | 
																 | 
																 | 
																        @see setDefaultMidiOutput, getDefaultMidiOutput
 | 
															
														
														
													
														
															
																 | 
																 | 
																    */
 | 
																 | 
																 | 
																    */
 | 
															
														
														
													
														
															
																 | 
																 | 
																    String getDefaultMidiOutputName() const                         { return defaultMidiOutputName; }
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    const String& getDefaultMidiOutputName() const noexcept         { return defaultMidiOutputName; }
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Returns the current default midi output device.
 | 
																 | 
																 | 
																    /** Returns the current default midi output device.
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        If no device has been selected, or the device can't be opened, this will
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        return 0.
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        If no device has been selected, or the device can't be opened, this will return nullptr.
 | 
															
														
														
													
														
															
																 | 
																 | 
																        @see getDefaultMidiOutputName
 | 
																 | 
																 | 
																        @see getDefaultMidiOutputName
 | 
															
														
														
													
														
															
																 | 
																 | 
																    */
 | 
																 | 
																 | 
																    */
 | 
															
														
														
													
														
															
																 | 
																 | 
																    MidiOutput* getDefaultMidiOutput() const noexcept               { return defaultMidiOutput; }
 | 
																 | 
																 | 
																    MidiOutput* getDefaultMidiOutput() const noexcept               { return defaultMidiOutput; }
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Returns a list of the types of device supported.
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    */
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    /** Returns a list of the types of device supported. */
 | 
															
														
														
													
														
															
																 | 
																 | 
																    const OwnedArray<AudioIODeviceType>& getAvailableDeviceTypes();
 | 
																 | 
																 | 
																    const OwnedArray<AudioIODeviceType>& getAvailableDeviceTypes();
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    //==============================================================================
 | 
																 | 
																 | 
																    //==============================================================================
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -429,9 +420,7 @@ public: | 
															
														
														
													
														
															
																 | 
																 | 
																    void enableInputLevelMeasurement (bool enableMeasurement);
 | 
																 | 
																 | 
																    void enableInputLevelMeasurement (bool enableMeasurement);
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    /** Returns the current input level.
 | 
																 | 
																 | 
																    /** Returns the current input level.
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        To use this, you must first enable it by calling enableInputLevelMeasurement().
 | 
																 | 
																 | 
																        To use this, you must first enable it by calling enableInputLevelMeasurement().
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        See enableInputLevelMeasurement() for more info.
 | 
																 | 
																 | 
																        See enableInputLevelMeasurement() for more info.
 | 
															
														
														
													
														
															
																 | 
																 | 
																    */
 | 
																 | 
																 | 
																    */
 | 
															
														
														
													
														
															
																 | 
																 | 
																    double getCurrentInputLevel() const;
 | 
																 | 
																 | 
																    double getCurrentInputLevel() const;
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -468,10 +457,16 @@ private: | 
															
														
														
													
														
															
																 | 
																 | 
																    int testSoundPosition;
 | 
																 | 
																 | 
																    int testSoundPosition;
 | 
															
														
														
													
														
															
																 | 
																 | 
																    AudioSampleBuffer tempBuffer;
 | 
																 | 
																 | 
																    AudioSampleBuffer tempBuffer;
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    struct MidiCallbackInfo
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    {
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        String deviceName;
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        MidiInputCallback* callback;
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    };
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    StringArray midiInsFromXml;
 | 
																 | 
																 | 
																    StringArray midiInsFromXml;
 | 
															
														
														
													
														
															
																 | 
																 | 
																    OwnedArray<MidiInput> enabledMidiInputs;
 | 
																 | 
																 | 
																    OwnedArray<MidiInput> enabledMidiInputs;
 | 
															
														
														
													
														
															
																 | 
																 | 
																    Array<MidiInputCallback*> midiCallbacks;
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    StringArray midiCallbackDevices;
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    Array<MidiCallbackInfo> midiCallbacks;
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    String defaultMidiOutputName;
 | 
																 | 
																 | 
																    String defaultMidiOutputName;
 | 
															
														
														
													
														
															
																 | 
																 | 
																    ScopedPointer<MidiOutput> defaultMidiOutput;
 | 
																 | 
																 | 
																    ScopedPointer<MidiOutput> defaultMidiOutput;
 | 
															
														
														
													
														
															
																 | 
																 | 
																    CriticalSection audioCallbackLock, midiCallbackLock;
 | 
																 | 
																 | 
																    CriticalSection audioCallbackLock, midiCallbackLock;
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																	
																 | 
																
  |