Module: MIDICommunications::Adapter::MacOS::Loader Private

Extended by:
Loader
Included in:
Loader
Defined in:
lib/midi-communications/adapter/macos.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Loader for macOS MIDI devices.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inputsArray<MIDICommunicationsMacOS::Source>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns all available MIDI input sources.

Returns:

  • (Array<MIDICommunicationsMacOS::Source>)


20
21
22
# File 'lib/midi-communications/adapter/macos.rb', line 20

def inputs
  ::MIDICommunicationsMacOS::Endpoint.all_by_type[:source]
end

.outputsArray<MIDICommunicationsMacOS::Destination>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns all available MIDI output destinations.

Returns:

  • (Array<MIDICommunicationsMacOS::Destination>)


26
27
28
# File 'lib/midi-communications/adapter/macos.rb', line 26

def outputs
  ::MIDICommunicationsMacOS::Endpoint.all_by_type[:destination]
end

.refreshvoid

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Discards the Core MIDI device list so that the next enumeration walks the system again.

Guarded on populated? because Device.refresh clears a list that does not exist until something has enumerated once.



37
38
39
# File 'lib/midi-communications/adapter/macos.rb', line 37

def refresh
  ::MIDICommunicationsMacOS::Device.refresh if ::MIDICommunicationsMacOS::Device.populated?
end

Instance Method Details

#inputsArray<MIDICommunicationsMacOS::Source>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns all available MIDI input sources.

Returns:

  • (Array<MIDICommunicationsMacOS::Source>)


20
21
22
# File 'lib/midi-communications/adapter/macos.rb', line 20

def inputs
  ::MIDICommunicationsMacOS::Endpoint.all_by_type[:source]
end

#outputsArray<MIDICommunicationsMacOS::Destination>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns all available MIDI output destinations.

Returns:

  • (Array<MIDICommunicationsMacOS::Destination>)


26
27
28
# File 'lib/midi-communications/adapter/macos.rb', line 26

def outputs
  ::MIDICommunicationsMacOS::Endpoint.all_by_type[:destination]
end

#refreshvoid

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Discards the Core MIDI device list so that the next enumeration walks the system again.

Guarded on populated? because Device.refresh clears a list that does not exist until something has enumerated once.



37
38
39
# File 'lib/midi-communications/adapter/macos.rb', line 37

def refresh
  ::MIDICommunicationsMacOS::Device.refresh if ::MIDICommunicationsMacOS::Device.populated?
end