24 lines
409 B
C++
24 lines
409 B
C++
#include <iostream>
|
|
#include <SDL2/SDL.h>
|
|
|
|
#include "BuzzerSDL.hpp"
|
|
|
|
int main(int argc, char* args[]) {
|
|
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) {
|
|
std::cerr << "Couldn't initialize SDL: " << SDL_GetError() << '\n';
|
|
return 1;
|
|
}
|
|
|
|
BuzzerSDL buzzer(440);
|
|
buzzer.on();
|
|
|
|
SDL_Event event;
|
|
while(SDL_WaitEvent(&event) && event.type != SDL_QUIT) {
|
|
}
|
|
|
|
buzzer.off();
|
|
SDL_Quit();
|
|
return 0;
|
|
}
|
|
|