<commit_before>#include "SoundManager.hpp"

//Mix_Chunk *SoundManager::effect;
//x_Chunk *SoundManager::bgmusic;
//int SoundManager::audio_channels, SoundManager::audio_rate,
// SoundManager::audio_buffers;
//Uint16 SoundManager::audio_format;
SoundManager *SoundManager::s = NULL;

SoundManager::SoundManager(void){ 
  audio_rate = 44100;
  audio_format = MIX_DEFAULT_FORMAT;
  audio_channels = 2;
  Mix_AllocateChannels(8);
  audio_buffers = 4096;
  bgmusic = NULL;
  //effect = NULL;
  if(Mix_OpenAudio(audio_rate, audio_format, 
		   audio_channels, audio_buffers)){
    std::cerr<<"unable to initiate Sound"<<std::endl;
  }
  LoadSound(DOT, "resources/sounds/bathos.wav");
  LoadSound(POWERUP, "resources/sounds/powerup.wav");
  LoadSound(GHOST, "resources/sounds/blibli.wav");
  LoadSound(GAMEOVER, "resources/sounds/gameover.wav");
  // one more ghost
  
}

SoundManager *SoundManager::Singleton(void){
  //s.bgmusic = NULL;
  //inits
  if(!s)
    s=new SoundManager();
  return s;<commit_msg>poo to eftia3a<commit_after>#include "SoundManager.hpp"

//Mix_Chunk *SoundManager::effect;
//x_Chunk *SoundManager::bgmusic;
//int SoundManager::audio_channels, SoundManager::audio_rate,
// SoundManager::audio_buffers;
//Uint16 SoundManager::audio_format;
SoundManager *SoundManager::s = NULL;

SoundManager::SoundManager(void){ 
  audio_rate = 44100;
  audio_format = MIX_DEFAULT_FORMAT;
  audio_channels = 2;
  Mix_AllocateChannels(8);
  audio_buffers = 4096;
  bgmusic = NULL;
  //effect = NULL;
  if(Mix_OpenAudio(audio_rate, audio_format, 
		   audio_channels, audio_buffers)){
    std::cerr<<"unable to initiate Sound"<<std::endl;
  }
  LoadSound(DOT, "resources/sounds/bubble.wav");
  LoadSound(POWERUP, "resources/sounds/powerup.wav");
  LoadSound(GHOST, "resources/sounds/blibli.wav");
  LoadSound(GAMEOVER, "resources/sounds/gameover.wav");
  // one more ghost
  
}

SoundManager *SoundManager::Singleton(void){
  //s.bgmusic = NULL;
  //inits
  if(!s)
    s=new SoundManager();
  return s;
{'fraction_non_alphanumeric': 0.14392803598200898, 'fraction_numerical': 0.013493253373313344, 'mean_word_length': 5.275862068965517, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6397321', 'n_tokens_mistral': 747, 'n_tokens_neox': 717, 'n_words': 117}