MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / SineWave

Function SineWave

tensorflow/core/kernels/spectrogram_test_utils.cc:298–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298void SineWave(int sample_rate, float frequency, float duration_seconds,
299 std::vector<double>* data) {
300 data->clear();
301 for (int i = 0; i < static_cast<int>(sample_rate * duration_seconds); ++i) {
302 data->push_back(
303 sin(2.0 * M_PI * i * frequency / static_cast<double>(sample_rate)));
304 }
305}
306
307} // namespace tensorflow

Callers 1

TESTFunction · 0.85

Calls 3

sinClass · 0.70
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected