#include #include "SDL/SDL.h" #include "SDL/SDL_mixer.h" #include "../include/Audio_Loader.h" using namespace std; int main() { if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 ) { return -1; } else { cout << "\ninit everything success"; } /* Audio_Loader audio; if (audio.Initialize() == 0) { cout << "\nInitialized Successfully"; } else { cout << "\nERROR: " << audio.GetLastError(); return -1; } Mix_Chunk *chunk = audio.OpenChunk("/home/joe/Desktop/beat.wav"); if (chunk == NULL) { cout << "\nERROR: " << audio.GetLastError(); return -1; } else { cout << "\nChunk Opened Successfuly"; cout << Mix_PlayChannel(-1, chunk, 0); } */ if( Mix_OpenAudio( 22050, MIX_DEFAULT_FORMAT, 2, 4096 ) == -1 ) { return -1; } else { cout << "\nopenaudio success"; } Mix_Chunk *chunk = Mix_LoadWAV("/home/joe/Desktop/low.wav"); if (chunk == NULL) { cout << "\nERROR: chunk == NULL"; return -1; } else { cout << "\nchunk not null"; } if (Mix_PlayChannel(-1, chunk, 0) == -1) { cout << "\nERROR: couldn't play chunk"; } else { cout << "Played chunk"; } return 0; }