| 1674 | } |
| 1675 | |
| 1676 | void 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 | |
| 1699 | void Utilities::fixWavetableIndexInFiles() { |
| 1700 | std::ifstream filein("/home/frot/odin2/Source/audio//Oscillators/" |
nothing calls this directly
no test coverage detected