Condividi tramite


Ricerca di un blocco RIFF

Nell'esempio seguente viene utilizzata la funzione mmioDescend per cercare un blocco "RIFF" con un tipo di modulo "WAVE" per verificare che il file appena aperto sia un file audio a forma d'onda.

HMMIO    hmmio; 
MMCKINFO mmckinfoParent; 
MMCKINFO mmckinfoSubchunk; 
. 
. 
. 
// Locate a "RIFF" chunk with a "WAVE" form type to make 
// sure the file is a waveform-audio file. 
mmckinfoParent.fccType = mmioFOURCC('W', 'A', 'V', 'E'); 
if (mmioDescend(hmmio, (LPMMCKINFO) &mmckinfoParent, NULL, 
    MMIO_FINDRIFF)) 
    // The file is not a waveform-audio file. 
else 
    // The file is a waveform-audio file