ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static HRESULT WINAPI IDirectMusicPortImpl_GetFormat ( LPDIRECTMUSICPORT  iface,
LPWAVEFORMATEX  pWaveFormatEx,
LPDWORD  pdwWaveFormatExSize,
LPDWORD  pdwBufferSize 
) [static]

Definition at line 190 of file port.c.

                                                                                                                                                                 {
    IDirectMusicPortImpl *This = (IDirectMusicPortImpl *)iface;
    WAVEFORMATEX format;
    FIXME("(%p, %p, %p, %p): stub\n", This, pWaveFormatEx, pdwWaveFormatExSize, pdwBufferSize);

    if (pWaveFormatEx == NULL)
    {
        if (pdwWaveFormatExSize)
            *pdwWaveFormatExSize = sizeof(format);
        else
            return E_POINTER;
    }
    else
    {
        if (pdwWaveFormatExSize == NULL)
            return E_POINTER;

        /* Just fill this in with something that will not crash Direct Sound for now. */
        /* It won't be used anyway until Performances are completed */
        format.wFormatTag = WAVE_FORMAT_PCM;
        format.nChannels = 2; /* This->params.dwAudioChannels; */
        format.nSamplesPerSec = 44100; /* This->params.dwSampleRate; */
        format.wBitsPerSample = 16; /* FIXME: check this */
        format.nBlockAlign = (format.wBitsPerSample * format.nChannels) / 8;
        format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign;
        format.cbSize = 0;

        if (*pdwWaveFormatExSize >= sizeof(format))
        {
            CopyMemory(pWaveFormatEx, &format, min(sizeof(format), *pdwWaveFormatExSize));
            *pdwWaveFormatExSize = sizeof(format);  /* FIXME check if this is set */
        }
        else
            return E_POINTER;   /* FIXME find right error */
    }

    if (pdwBufferSize)
        *pdwBufferSize = 44100 * 2 * 2;
    else
        return E_POINTER;

    return S_OK;
}

Generated on Fri May 25 2012 05:00:41 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.