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

Function sample_points_f32

src/framework/debug/trace.cpp:223–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221 points.erase(std::unique(points.begin(), points.end()), points.end());
222 return points;
223}
224
225std::string sample_points_f32(const std::vector<float> & values) {
226 if (values.empty()) {
227 return "[]";
228 }
229 const std::vector<size_t> points = sample_point_indices(values.size());
230 std::ostringstream oss;
231 oss << "[";
232 for (size_t i = 0; i < points.size(); ++i) {
233 if (i != 0) {
234 oss << ",";
235 }
236 const size_t index = points[i];
237 oss << index << ":" << values[index];
238 }
239 oss << "]";
240 return oss.str();
241}
242

Callers 1

trace_log_f32Function · 0.85

Calls 4

sample_point_indicesFunction · 0.85
strMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected