- char* song_path;
- char* song_subtitle;
-
- level_song = SoundManager::get()->load_music(datadir + "/music/" + song_title);
-
- song_path = (char *) malloc(sizeof(char) * datadir.length() +
- strlen(song_title.c_str()) + 8 + 5);
- song_subtitle = strdup(song_title.c_str());
- strcpy(strstr(song_subtitle, "."), "\0");
- sprintf(song_path, "%s/music/%s-fast%s", datadir.c_str(),
- song_subtitle, strstr(song_title.c_str(), "."));
- if(!SoundManager::get()->exists_music(song_path)) {
- level_song_fast = level_song;
- } else {
- level_song_fast = SoundManager::get()->load_music(song_path);
- }
- free(song_subtitle);
- free(song_path);