MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / sndfile_sample_format

Function sndfile_sample_format

src/decoder/plugins/SndfileDecoderPlugin.cxx:132–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132[[gnu::pure]]
133static SampleFormat
134sndfile_sample_format(const SF_INFO &info) noexcept
135{
136 switch (info.format & SF_FORMAT_SUBMASK) {
137 case SF_FORMAT_PCM_S8:
138 case SF_FORMAT_PCM_U8:
139 case SF_FORMAT_PCM_16:
140 return SampleFormat::S16;
141
142 case SF_FORMAT_FLOAT:
143 case SF_FORMAT_DOUBLE:
144 return SampleFormat::FLOAT;
145
146 default:
147 return SampleFormat::S32;
148 }
149}
150
151static AudioFormat
152CheckAudioFormat(const SF_INFO &info)

Callers 1

CheckAudioFormatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected