cannot convert `WAVEFORMATEXTENSIBLE*' to `tWAVEFORMATEX*'
wfex.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
wfex.Format.nChannels = g.s.dxOutChan;
wfex.Format.nBlockAlign = (g.s.dxOutChan * g.s.dxOutBitSiz) / 8;
wfex.Format.nSamplesPerSec = g.s.SAMPLE_RATE;
wfex.Format.nAvgBytesPerSec = wfex.Format.nSamplesPerSec * wfex.Format.nBlockAlign;
wfex.Format.wBitsPerSample = g.s.dxOutBitSiz;
wfex.Format.cbSize = 22;
wfex.Samples.wValidBitsPerSample = g.s.dxOutBitSiz;
wfex.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
wfex.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
dsbd.dwSize = sizeof(DSBUFFERDESC);
dsbd.dwFlags = DSBCAPS_GLOBALFOCUS | DSBCAPS_GETCURRENTPOSITION2;
dsbd.dwFlags |= DSBCAPS_CTRLPOSITIONNOTIFY;
dsbd.dwBufferBytes = iFrameSize * g.s.dxOutBytSiz * NBLOCKS;
dsbd.lpwfxFormat = &wfex;
报错:
cannot convert `WAVEFORMATEXTENSIBLE*' to `tWAVEFORMATEX*' in assignment
怎么解决啊??
[解决办法]
看出错是哪行,可能是等号左右的类型不对