MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / pcm16_to_float_unit_range

Function pcm16_to_float_unit_range

src/framework/audio/waveform_ops.cpp:130–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130std::vector<float> pcm16_to_float_unit_range(const std::vector<int16_t> & pcm_samples) {
131 std::vector<float> samples(pcm_samples.size(), 0.0F);
132 for (size_t i = 0; i < pcm_samples.size(); ++i) {
133 samples[i] = static_cast<float>(pcm_samples[i]) / 32768.0F;
134 }
135 return samples;
136}
137
138} // namespace engine::audio

Callers 2

finalizeMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected