normalitzat Audio
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#include <iostream> // for basic_ostream, operator<<, basic_ostrea...
|
||||
#include <string> // for basic_string, operator+, char_traits
|
||||
|
||||
#include "core/audio/jail_audio.hpp" // for JA_StopMusic, JA_GetMusicState, JA_Play...
|
||||
#include "core/audio/audio.hpp" // for Audio
|
||||
#include "core/input/global_inputs.hpp" // for GlobalInputs::handle
|
||||
#include "core/input/input.h" // for Input, INPUT_USE_GAMECONTROLLER, INPUT_...
|
||||
#include "core/locale/lang.h" // for Lang, ba_BA, en_UK, es_ES
|
||||
@@ -212,7 +212,7 @@ void Title::init() {
|
||||
// Actualiza las variables del objeto
|
||||
void Title::update() {
|
||||
// Actualiza el audio
|
||||
JA_Update();
|
||||
Audio::update();
|
||||
|
||||
// Comprueba las entradas
|
||||
checkInput();
|
||||
@@ -243,7 +243,7 @@ void Title::update() {
|
||||
Screen::get()->blit();
|
||||
|
||||
// Reproduce el efecto sonoro
|
||||
JA_PlaySound(crashSound);
|
||||
Audio::get()->playSound(crashSound);
|
||||
}
|
||||
} break;
|
||||
|
||||
@@ -276,8 +276,8 @@ void Title::update() {
|
||||
// Sección 3 - La pantalla de titulo con el menú y la música
|
||||
case SUBSECTION_TITLE_3: {
|
||||
if (counter > 0) { // Reproduce la música
|
||||
if ((JA_GetMusicState() == JA_MUSIC_INVALID) || (JA_GetMusicState() == JA_MUSIC_STOPPED)) {
|
||||
JA_PlayMusic(titleMusic);
|
||||
if (Audio::getRealMusicState() == Audio::MusicState::STOPPED) {
|
||||
Audio::get()->playMusic(titleMusic);
|
||||
}
|
||||
|
||||
dustBitmapR->update();
|
||||
@@ -291,19 +291,19 @@ void Title::update() {
|
||||
case 0: // 1 PLAYER
|
||||
section->name = SECTION_PROG_GAME;
|
||||
section->subsection = SUBSECTION_GAME_PLAY_1P;
|
||||
JA_StopMusic();
|
||||
Audio::get()->stopMusic();
|
||||
break;
|
||||
|
||||
case 1: // 2 PLAYERS
|
||||
section->name = SECTION_PROG_GAME;
|
||||
section->subsection = SUBSECTION_GAME_PLAY_2P;
|
||||
JA_StopMusic();
|
||||
Audio::get()->stopMusic();
|
||||
break;
|
||||
|
||||
case 2: // QUIT
|
||||
#ifndef __EMSCRIPTEN__
|
||||
section->name = SECTION_PROG_QUIT;
|
||||
JA_StopMusic();
|
||||
Audio::get()->stopMusic();
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user