Skip to content

Commit

Permalink
Fixing cout beauty, comments for #30
Browse files Browse the repository at this point in the history
  • Loading branch information
jgvictores committed Apr 6, 2018
1 parent 90ca31c commit e061fe7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/libraries/MentalMapLib/MentalMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ rd::MentalMap::MentalMap()
current_weapon = 0;
my_id = -1;
myself = NULL;
SDLAudioManager::RegisterManager();
audioManager = AudioManager::getAudioManager("SDL");
SDLAudioManager::RegisterManager(); // See #30
audioManager = AudioManager::getAudioManager("SDL"); // See #30
}

rd::MentalMap *rd::MentalMap::getMentalMap()
Expand Down
4 changes: 2 additions & 2 deletions src/libraries/MusicLib/AudioManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ bool rd::AudioManager::Register(AudioManager *manager, const std::string & id)
}
else
{
CD_ERROR( "AudioManager with id \"%s\" was already registered\n", id.c_str());
return false;
CD_WARNING( "(known issue) AudioManager with id \"%s\" was already registered\n", id.c_str()); // Change to CD_ERRROR after fixing #30
return true; // Return false after fixing #30
}

}
3 changes: 2 additions & 1 deletion src/programs/robotDevastation/RobotDevastation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ bool rd::RobotDevastation::initPlayerInfo(yarp::os::ResourceFinder &rf)

bool rd::RobotDevastation::initSound(yarp::os::ResourceFinder &rf)
{
SDLAudioManager::RegisterManager();
if( ! SDLAudioManager::RegisterManager() )
return false;
audioManager = AudioManager::getAudioManager("SDL");

std::string bsoStr( rf.findFileByName("../sounds/RobotDevastationBSO.mp3") );
Expand Down

0 comments on commit e061fe7

Please sign in to comment.