Files
osc/src/main.cpp
T

35 lines
624 B
C++
Raw Normal View History

#include <iostream>
#include <stdexcept>
#include "../include/synth.hpp"
#include "../include/audio_engine.hpp"
int main(){
std::cout << "110.гц\n";
2026-11-12 20:58:48 +06:00
std::string a = "";
Synth synth;
synth.set_frequency(110);
synth.set_amplitude(0.5);
try{
AudioEngine audio_engine(synth);
2026-11-12 20:58:48 +06:00
while (true){
std::cin >> a;
if (a == "start"){
audio_engine.start();
}
else audio_engine.stop();
}
}
catch (const std::exception& error){
std::cerr << error.what() << "\n";
return 1;
}
return 0;
}