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

Function reflect_index

src/framework/audio/dsp.cpp:38–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38int64_t reflect_index(int64_t index, int64_t length) {
39 while (index < 0 || index >= length) {
40 if (index < 0) {
41 index = -index;
42 } else {
43 index = 2 * length - index - 2;
44 }
45 }
46 return index;
47}
48
49float hz_to_mel(float hz) {
50 constexpr float kFsp = 200.0f / 3.0f;

Callers 1

compute_complexMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected