MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / set_wave_format

Function set_wave_format

tools/audio.cpp:112–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 };
111
112 void set_wave_format(audio::wave_format_t &wave_format, const format_t &format) {
113 wave_format->nChannels = format.channels;
114 wave_format->nBlockAlign = wave_format->nChannels * wave_format->wBitsPerSample / 8;
115 wave_format->nAvgBytesPerSec = wave_format->nSamplesPerSec * wave_format->nBlockAlign;
116
117 if (wave_format->wFormatTag == WAVE_FORMAT_EXTENSIBLE) {
118 ((PWAVEFORMATEXTENSIBLE) wave_format.get())->dwChannelMask = format.channel_mask;
119 }
120 }
121
122 audio_client_t make_audio_client(device_t &device, const format_t &format) {
123 audio_client_t audio_client;

Callers 1

make_audio_clientFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected