небольшое обновление
This commit is contained in:
+8
-3
@@ -7,6 +7,7 @@
|
||||
int main(){
|
||||
|
||||
std::cout << "110.гц\n";
|
||||
std::string a = "";
|
||||
Synth synth;
|
||||
synth.set_frequency(110);
|
||||
synth.set_amplitude(0.5);
|
||||
@@ -15,9 +16,13 @@ int main(){
|
||||
|
||||
try{
|
||||
AudioEngine audio_engine(synth);
|
||||
audio_engine.start();
|
||||
std::cin.get();
|
||||
audio_engine.stop();
|
||||
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";
|
||||
|
||||
Reference in New Issue
Block a user