[PATCH 0/5] MR49: MPEG audio decoder

Chip Davis (@cdavis5e) wine at gitlab.winehq.org
Mon May 9 02:13:19 CDT 2022


Chip Davis (@cdavis5e) commented about include/mpegtype.idl:
> +
> +    HRESULT put_DecoderWordSize(
> +        unsigned long word_size);
> +
> +    HRESULT put_DualMode(
> +        unsigned long dual_mode);
> +
> +    HRESULT put_FrequencyDivider(
> +        unsigned long divider);
> +
> +    HRESULT put_IntegerDecode(
> +        unsigned long integer_decode);
> +
> +    HRESULT put_Stereo(
> +        unsigned long stereo);
> +}
At least in the Windows 7 SDK, these methods are in a completely different order. Unlike with free functions, order is significant here, because it determines how the v-table is physically laid out.

So something like this:
```suggestion:-40+0
interface IMpegAudioDecoder : IUnknown
{
    [propget] HRESULT FrequencyDivider(
        [out, retval] unsigned long *divider);

    [propput] HRESULT FrequencyDivider(
        unsigned long divider);

    [propget] HRESULT DecoderAccuracy(
        [out, retval] unsigned long *accuracy);

    [propput] HRESULT DecoderAccuracy(
        unsigned long accuracy);

    [propget] HRESULT Stereo(
        [out, retval] unsigned long *stereo);

    [propput] HRESULT Stereo(
        unsigned long stereo);

    [propget] HRESULT DecoderWordSize(
        [out, retval] unsigned long *word_size);

    [propput] HRESULT DecoderWordSize(
        unsigned long word_size);

    [propget] HRESULT IntegerDecode(
        [out, retval] unsigned long *integer_decode);

    [propput] HRESULT IntegerDecode(
        unsigned long integer_decode);

    [propget] HRESULT DualMode(
        [out, retval] unsigned long *dual_mode);

    [propput] HRESULT DualMode(
        unsigned long dual_mode);

    [propget] HRESULT AudioFormat(
        [out, retval] MPEG1WAVEFORMAT *format);
}
```

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/49#note_746



More information about the wine-devel mailing list