OH_MIDIPortDescriptor
typedef struct {...} OH_MIDIPortDescriptor
Overview
This struct describes the port descriptor, which is used to specify the port index and protocol behavior for opening a port.
Since: 24
Related module: OHMIDI
Header file: native_midi_base.h
Summary
Member Variables
| Name | Description |
|---|---|
| uint32_t portIndex | Index of the port to be opened. Since: 24 |
| OH_MIDIProtocol protocol | MIDI protocol version to be used (MIDI 1.0 or MIDI 2.0). The service converts data between applications and hardware based on the value of this field. An application merely declares the expected protocol version. The following system behavior applies when the protocol version does not match the hardware: 1. Requesting OH_MIDI_PROTOCOL_1.0 on a MIDI 2.0 device (lossless compatibility): The application sends UMP Type 2 (MIDI 1.0 channel voice) messages. The service forwards them directly to the device. No data loss occurs. 2. Requesting OH_MIDI_PROTOCOL_2.0 on a MIDI 1.0 device (lossy conversion): The application sends UMP Type 4 (MIDI 2.0 channel voice) messages. The service down-converts them to Type 2 messages (for example, truncating velocity values and discarding per-note data). Data precision is lost, and advanced messages may be discarded. Since: 24 |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-native-audiostreambuilder-h
openharmony 鸿蒙 capi-ohaudiosuite
openharmony 鸿蒙 js-apis-inner-multimedia-systemSoundPlayer
openharmony 鸿蒙 arkts-apis-audio-i
openharmony 鸿蒙 arkts-apis-audio-AudioManager
openharmony 鸿蒙 capi-ohaudiosuite-oh-audiosuite-spacerenderpositionparams