Home | History | Annotate | Download | only in audio

Lines Matching refs:wfx

14 int waveformat_from_audio_settings (WAVEFORMATEX *wfx,
17 memset (wfx, 0, sizeof (*wfx));
19 wfx->wFormatTag = WAVE_FORMAT_PCM;
20 wfx->nChannels = as->nchannels;
21 wfx->nSamplesPerSec = as->freq;
22 wfx->nAvgBytesPerSec = as->freq << (as->nchannels == 2);
23 wfx->nBlockAlign = 1 << (as->nchannels == 2);
24 wfx->cbSize = 0;
29 wfx->wBitsPerSample = 8;
34 wfx->wBitsPerSample = 16;
35 wfx->nAvgBytesPerSec <<= 1;
36 wfx->nBlockAlign <<= 1;
41 wfx->wBitsPerSample = 32;
42 wfx->nAvgBytesPerSec <<= 2;
43 wfx->nBlockAlign <<= 2;
54 int waveformat_to_audio_settings (WAVEFORMATEX *wfx,
57 if (wfx->wFormatTag != WAVE_FORMAT_PCM) {
59 wfx->wFormatTag);
63 if (!wfx->nSamplesPerSec) {
67 as->freq = wfx->nSamplesPerSec;
69 switch (wfx->nChannels) {
81 wfx->nChannels
86 switch (wfx->wBitsPerSample) {
102 wfx->wBitsPerSample);