Application: Fix uninitalized fmt_pcm_t field warning

This commit is contained in:
Jared Boone 2018-08-05 15:07:12 -07:00
parent 17e5f6a1d7
commit f08e80e156

View File

@ -32,20 +32,26 @@
struct fmt_pcm_t { struct fmt_pcm_t {
constexpr fmt_pcm_t( constexpr fmt_pcm_t(
const uint32_t sampling_rate const uint32_t sampling_rate
) : nSamplesPerSec { sampling_rate }, ) : ckID { 'f', 'm', 't', ' ' },
nAvgBytesPerSec { nSamplesPerSec * nBlockAlign } cksize { 16 },
wFormatTag { 0x0001 },
nChannels { 1 },
nSamplesPerSec { sampling_rate },
nAvgBytesPerSec { sampling_rate * 2 },
nBlockAlign { 2 },
wBitsPerSample { 16 }
{ {
} }
private: private:
uint8_t ckID[4] { 'f', 'm', 't', ' ' }; uint8_t ckID[4];
uint32_t cksize { 16 }; uint32_t cksize;
uint16_t wFormatTag { 0x0001 }; uint16_t wFormatTag;
uint16_t nChannels { 1 }; uint16_t nChannels;
uint32_t nSamplesPerSec; uint32_t nSamplesPerSec;
uint32_t nAvgBytesPerSec; uint32_t nAvgBytesPerSec;
uint16_t nBlockAlign { 2 }; uint16_t nBlockAlign;
uint16_t wBitsPerSample { 16 }; uint16_t wBitsPerSample;
}; };
struct data_t { struct data_t {