Lines Matching refs:wfx
14 int waveformat_from_audio_settings (WAVEFORMATEX *wfx, in waveformat_from_audio_settings() argument
17 memset (wfx, 0, sizeof (*wfx)); in waveformat_from_audio_settings()
19 wfx->nChannels = as->nchannels; in waveformat_from_audio_settings()
20 wfx->nSamplesPerSec = as->freq; in waveformat_from_audio_settings()
21 wfx->nAvgBytesPerSec = as->freq << (as->nchannels == 2); in waveformat_from_audio_settings()
22 wfx->nBlockAlign = 1 << (as->nchannels == 2); in waveformat_from_audio_settings()
23 wfx->cbSize = 0; in waveformat_from_audio_settings()
28 wfx->wFormatTag = WAVE_FORMAT_PCM; in waveformat_from_audio_settings()
29 wfx->wBitsPerSample = 8; in waveformat_from_audio_settings()
34 wfx->wFormatTag = WAVE_FORMAT_PCM; in waveformat_from_audio_settings()
35 wfx->wBitsPerSample = 16; in waveformat_from_audio_settings()
36 wfx->nAvgBytesPerSec <<= 1; in waveformat_from_audio_settings()
37 wfx->nBlockAlign <<= 1; in waveformat_from_audio_settings()
42 wfx->wFormatTag = WAVE_FORMAT_PCM; in waveformat_from_audio_settings()
43 wfx->wBitsPerSample = 32; in waveformat_from_audio_settings()
44 wfx->nAvgBytesPerSec <<= 2; in waveformat_from_audio_settings()
45 wfx->nBlockAlign <<= 2; in waveformat_from_audio_settings()
49 wfx->wFormatTag = WAVE_FORMAT_IEEE_FLOAT; in waveformat_from_audio_settings()
50 wfx->wBitsPerSample = 32; in waveformat_from_audio_settings()
51 wfx->nAvgBytesPerSec <<= 2; in waveformat_from_audio_settings()
52 wfx->nBlockAlign <<= 2; in waveformat_from_audio_settings()
63 int waveformat_to_audio_settings (WAVEFORMATEX *wfx, in waveformat_to_audio_settings() argument
66 if (!wfx->nSamplesPerSec) { in waveformat_to_audio_settings()
70 as->freq = wfx->nSamplesPerSec; in waveformat_to_audio_settings()
72 switch (wfx->nChannels) { in waveformat_to_audio_settings()
84 wfx->nChannels in waveformat_to_audio_settings()
89 if (wfx->wFormatTag == WAVE_FORMAT_PCM) { in waveformat_to_audio_settings()
90 switch (wfx->wBitsPerSample) { in waveformat_to_audio_settings()
106 wfx->wBitsPerSample); in waveformat_to_audio_settings()
109 } else if (wfx->wFormatTag == WAVE_FORMAT_IEEE_FLOAT) { in waveformat_to_audio_settings()
110 switch (wfx->wBitsPerSample) { in waveformat_to_audio_settings()
118 wfx->wBitsPerSample); in waveformat_to_audio_settings()
124 wfx->wFormatTag); in waveformat_to_audio_settings()