WAVEFORMATEX - how to read codecdata at the end??

Posted by Roey on Stack Overflow See other posts from Stack Overflow or by Roey
Published on 2010-06-01T07:48:24Z Indexed on 2010/06/01 7:53 UTC
Read the original article Hit count: 160

Filed under:
|
|

Hi All.

I've a WAVEFORMATEX struct with some codecdata at the end of it (10 bytes).

I'm using C++.

How do I access the data at the end? (this is a purely technical question).

I tried :

WAVEFORMATEX* wav = (WAVEFORMATEX*)pmt->pbFormat;
    WORD me = wav->cbSize;
    wav = wav + sizeof(WAVEFORMATEX);
    BYTE* arr = new BYTE[me];
    memcpy(arr, (BYTE*)wav, me);

Didnt work.

Thanks

Roey

© Stack Overflow or respective owner

Related posts about c++

Related posts about media