MCPcopy Create free account
hub / github.com/TheWaveWarden/odin2 / fixWavetableCoefficientFile

Method fixWavetableCoefficientFile

Source/Utilities.cpp:1676–1697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1674}
1675
1676void Utilities::fixWavetableCoefficientFile() {
1677
1678 int highest_table = 4;
1679
1680 std::ifstream filein("/home/frot/odin2/Source/audio//Oscillators/"
1681 "WavetableCoefficients.h"); // File to read from
1682 std::ofstream fileout("/home/frot/odin2/Source/audio//Oscillators/TEMPORARY.h"); // Temporary
1683 // file
1684 if (!filein || !fileout) {
1685 DBG("Error opening files!");
1686 return;
1687 }
1688
1689 std::string line;
1690 while (getline(filein, line)) {
1691 if (line.find("->") != std::string::npos) {
1692 line += to_string_padded(++highest_table);
1693 }
1694 line += "\n";
1695 fileout << line;
1696 }
1697}
1698
1699void Utilities::fixWavetableIndexInFiles() {
1700 std::ifstream filein("/home/frot/odin2/Source/audio//Oscillators/"

Callers

nothing calls this directly

Calls 1

to_string_paddedFunction · 0.85

Tested by

no test coverage detected