MCPcopy Create free account
hub / github.com/SFML/SFML / check

Method check

src/SFML/Audio/SoundFileReaderWav.cpp:89–103  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

87{
88////////////////////////////////////////////////////////////
89bool SoundFileReaderWav::check(InputStream& stream)
90{
91 auto config = ma_decoder_config_init_default();
92 config.encodingFormat = ma_encoding_format_wav;
93 config.format = ma_format_s16;
94 ma_decoder decoder{};
95
96 if (ma_decoder_init(&onRead, &onSeek, &stream, &config, &decoder) == MA_SUCCESS)
97 {
98 ma_decoder_uninit(&decoder);
99 return true;
100 }
101
102 return false;
103}
104
105
106////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected