3

我正在尝试创建一个微型端口驱动程序(IMiniportDMus),它将公开两个 MIDI 输入和两个 MIDI 输出引脚(旧版)。在 Windows Vista 和 Win 7 中,当我使用 midiInXXX 和 midiOutXXX 函数时,我会看到这些引脚,但在 Windows XP 中,我只看到一个 midi in 和一个 midi out 引脚。

这是我的引脚描述符数组:

static PCPIN_DESCRIPTOR MiniportPins[] =
{
    {
    kMaxNumLegacyRenderStreams, kMaxNumLegacyRenderStreams, 0,  // InstanceCount
    NULL,                                                       // AutomationTable
    {                                                           // KsPinDescriptor
        0,                                                      // InterfacesCount
        NULL,                                                   // Interfaces
        0,                                                      // MediumsCount
        NULL,                                                   // Mediums
        SIZEOF_ARRAY(PinDataRangePointersStreamLegacy),         // DataRangesCount
        PinDataRangePointersStreamLegacy,                       // DataRanges
        KSPIN_DATAFLOW_IN,                                      // DataFlow
        KSPIN_COMMUNICATION_SINK,                               // Communication
        (GUID *) &KSCATEGORY_AUDIO,                             // Category
        &KSAUDFNAME_MIDI,                                       // Name
        0                                                       // Reserved
    }
},
{
    kMaxNumCaptureStreams, kMaxNumCaptureStreams, 0,            // InstanceCount
    NULL,                                                       // AutomationTable
    {                                                           // KsPinDescriptor
        0,                                                      // InterfacesCount
        NULL,                                                   // Interfaces
        0,                                                      // MediumsCount
        NULL,                                                   // Mediums
        SIZEOF_ARRAY(PinDataRangePointersStreamLegacy),         // DataRangesCount
        PinDataRangePointersStreamLegacy,                       // DataRanges
        KSPIN_DATAFLOW_OUT,                                     // DataFlow
        KSPIN_COMMUNICATION_SINK,                               // Communication
        (GUID *) &KSCATEGORY_AUDIO,                             // Category
        &KSAUDFNAME_MIDI,                                       // Name
        0                                                       // Reserved
    }
},
{
    kMaxNumLegacyRenderStreams, kMaxNumLegacyRenderStreams, 0,  // InstanceCount
    NULL,                                                       // AutomationTable
    {                                                           // KsPinDescriptor
        0,                                                      // InterfacesCount
        NULL,                                                   // Interfaces
        0,                                                      // MediumsCount
        NULL,                                                   // Mediums
        SIZEOF_ARRAY(PinDataRangePointersStreamLegacy),         // DataRangesCount
        PinDataRangePointersStreamLegacy,                       // DataRanges
        KSPIN_DATAFLOW_IN,                                      // DataFlow
        KSPIN_COMMUNICATION_SINK,                               // Communication
        (GUID *) &KSCATEGORY_AUDIO,                             // Category
        &KSAUDFNAME_MIDI,                                       // Name
        0                                                       // Reserved
    }
},
{
    kMaxNumCaptureStreams, kMaxNumCaptureStreams, 0,            // InstanceCount
    NULL,                                                       // AutomationTable
    {                                                           // KsPinDescriptor
        0,                                                      // InterfacesCount
        NULL,                                                   // Interfaces
        0,                                                      // MediumsCount
        NULL,                                                   // Mediums
        SIZEOF_ARRAY(PinDataRangePointersStreamLegacy),         // DataRangesCount
        PinDataRangePointersStreamLegacy,                       // DataRanges
        KSPIN_DATAFLOW_OUT,                                     // DataFlow
        KSPIN_COMMUNICATION_SINK,                               // Communication
        (GUID *) &KSCATEGORY_AUDIO,                             // Category
        &KSAUDFNAME_MIDI,                                       // Name
        0                                                       // Reserved
    }
}
};

如果 Windows XP 支持多个 midi 引脚,我找不到任何信息。我什至通过定义特定的 GUID 并注册它们来更新引脚名称。

这是一个已知问题还是我做错了什么?

4

0 回答 0