#include <iostream>
#include "ohno.h"
#include <windows.h>
#include <mmeapi.h>
#include <mmreg.h>
using namespace std;

int main()
{
    HWAVEOUT hWaveOut;
    WAVEFORMATEX wfx = {}; 

 
    wfx.wFormatTag = WAVE_FORMAT_PCM;
    wfx.nChannels = 2;                     
    wfx.nSamplesPerSec = 44100;            
    wfx.wBitsPerSample = 16;                

    
    wfx.nBlockAlign = (wfx.nChannels * wfx.wBitsPerSample) / 8;
    wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
    wfx.cbSize = 0;

    
    if (waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL) != MMSYSERR_NOERROR) {

        return 1;
    }

    
    WAVEHDR header = { (LPSTR)ohno, 310310, 0, 0, 0, 0, NULL, 0 };
    waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR));

   
    cout << "i hacked you" << endl;
    waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR));

 
    while (!(header.dwFlags & WHDR_DONE)) {
        Sleep(100); 
    }

  
    waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR));
    waveOutClose(hWaveOut);
    Sleep(2000);
    cout << "lol jk" << endl;
    while(true)
    {
        Sleep(1000);
    }
    return 0;
}
