Optimise the audio files

This commit is contained in:
wiidev 2023-01-01 17:00:06 +00:00
parent b403ecea6a
commit ab94417c1f
16 changed files with 23 additions and 45 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
data/sounds/button_over.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -170,12 +170,9 @@ int MainMenu(int menu)
InitProgressThread();
btnSoundClick = new GuiSound(NULL, 0, Settings.sfxvolume);
btnSoundClick->LoadSoundEffect(Resources::GetFile("button_click.wav"), Resources::GetFileSize("button_click.wav"));
btnSoundClick2 = new GuiSound(NULL, 0, Settings.sfxvolume);
btnSoundClick2->LoadSoundEffect(Resources::GetFile("button_click2.wav"), Resources::GetFileSize("button_click2.wav"));
btnSoundOver = new GuiSound(NULL, 0, Settings.sfxvolume);
btnSoundOver->LoadSoundEffect(Resources::GetFile("button_over.wav"), Resources::GetFileSize("button_over.wav"));
btnSoundClick = new GuiSound(Resources::GetFile("button_click.ogg"), Resources::GetFileSize("button_click.ogg"), Settings.sfxvolume);
btnSoundClick2 = new GuiSound(Resources::GetFile("button_click2.ogg"), Resources::GetFileSize("button_click2.ogg"), Settings.sfxvolume);
btnSoundOver = new GuiSound(Resources::GetFile("button_over.ogg"), Resources::GetFileSize("button_over.ogg"), Settings.sfxvolume);
pointer[0] = new WiiPointer("player1_point.png");
pointer[1] = new WiiPointer("player2_point.png");

View File

@ -160,7 +160,7 @@ int OnScreenNumpad(char * var, u32 maxlen)
mainWindow->Remove(&numpad);
mainWindow->SetState(STATE_DEFAULT);
ResumeGui();
gprintf("\t%s", (save == 1 ? "saved" : "discarded"));
gprintf("\t%s\n", (save == 1 ? "saved" : "discarded"));
return save;
}
@ -234,7 +234,7 @@ int OnScreenKeyboard(char * var, u32 maxlen, int min, bool hide, bool restrict)
mainWindow->Remove(&keyboard);
mainWindow->SetState(STATE_DEFAULT);
ResumeGui();
gprintf("\t%s", (save ? "saved" : "discarded"));
gprintf("\t%s\n", (save ? "saved" : "discarded"));
return save;
}
@ -247,15 +247,6 @@ void WindowCredits()
gprintf("WindowCredits()\n");
int angle = 0;
GuiSound * creditsMusic = NULL;
bgMusic->Pause();
creditsMusic = new GuiSound(Resources::GetFile("credits_music.ogg"), Resources::GetFileSize("credits_music.ogg"), 55);
creditsMusic->SetVolume(60);
creditsMusic->SetLoop(1);
creditsMusic->Play();
GuiTrigger trigA;
trigA.SetButtonOnlyTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
GuiTrigger trigB;
@ -393,7 +384,7 @@ void WindowCredits()
currentTxt->SetFont(creditsFont, creditsFontSize);
txt.push_back(currentTxt);
currentTxt = new GuiText("https://sourceforge.net/p/usbloadergx/", 20, ( GXColor ) {255, 255, 255, 255});
currentTxt = new GuiText("https://github.com/wiidev/usbloadergx", 20, ( GXColor ) {255, 255, 255, 255});
currentTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
currentTxt->SetPosition(160, y);
currentTxt->SetFont(creditsFont, creditsFontSize);
@ -408,14 +399,14 @@ void WindowCredits()
currentTxt->SetFont(creditsFont, creditsFontSize);
txt.push_back(currentTxt);
currentTxt = new GuiText("Cyan / Dimok / nIxx / giantpune / ardi / hungyip84");
currentTxt = new GuiText("Cyan / Dimok / blackb0x / nIxx / giantpune / ardi");
currentTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
currentTxt->SetPosition(160, y);
currentTxt->SetFont(creditsFont, creditsFontSize);
txt.push_back(currentTxt);
y += 20;
currentTxt = new GuiText("DrayX7 / lustar / r-win / WiiShizzza / blackb0x");
currentTxt = new GuiText("hungyip84 / DrayX7 / lustar / r-win / WiiShizzza");
currentTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
currentTxt->SetPosition(160, y);
currentTxt->SetFont(creditsFont, creditsFontSize);
@ -563,10 +554,6 @@ void WindowCredits()
starImg.SetAngle(angle);
}
backBtn.ResetState();
creditsMusic->Stop();
delete creditsMusic;
creditsWindow.SetEffect(EFFECT_FADE, -30);
while (creditsWindow.GetEffect() > 0)
@ -581,8 +568,6 @@ void WindowCredits()
}
Settings.FontScaleFactor = oldFontScale;
ResumeGui();
bgMusic->Resume();
}
/****************************************************************************
@ -704,8 +689,8 @@ int WindowPrompt(const char *title, const char *msg, const char *btn1Label, cons
* Displays a prompt window to user, with information, an error message, or
* presenting a user with a choice of up to 4 Buttons.
*
* Give him 1 Titel, 1 Subtitel and 4 Buttons
* If titel/subtitle or one of the buttons is not needed give him a 0 on that
* Give him 1 title, 1 subtitle and 4 buttons
* If title/subtitle or one of the buttons is not needed give him a 0 on that
* place.
***************************************************************************/
int WindowExitPrompt()

View File

@ -55,9 +55,9 @@ void Theme::Reload()
delete btnSoundClick;
delete btnSoundClick2;
delete btnSoundOver;
btnSoundClick = new GuiSound(Resources::GetFile("button_click.wav"), Resources::GetFileSize("button_click.wav"), Settings.sfxvolume);
btnSoundClick2 = new GuiSound(Resources::GetFile("button_click2.wav"), Resources::GetFileSize("button_click2.wav"), Settings.sfxvolume);
btnSoundOver = new GuiSound(Resources::GetFile("button_over.wav"), Resources::GetFileSize("button_over.wav"), Settings.sfxvolume);
btnSoundClick = new GuiSound(Resources::GetFile("button_click.ogg"), Resources::GetFileSize("button_click.ogg"), Settings.sfxvolume);
btnSoundClick2 = new GuiSound(Resources::GetFile("button_click2.ogg"), Resources::GetFileSize("button_click2.ogg"), Settings.sfxvolume);
btnSoundOver = new GuiSound(Resources::GetFile("button_over.ogg"), Resources::GetFileSize("button_over.ogg"), Settings.sfxvolume);
delete background;
background = Resources::GetImageData(Settings.widescreen ? "wbackground.png" : "background.png");
delete bgImg;

View File

@ -1,7 +1,7 @@
/****************************************************************************
* USB Loader GX resource files.
* This file is generated automatically.
* Includes 200 files.
* Includes 199 files.
*
* NOTE:
* Any manual modification of this file will be overwriten by the generation.
@ -572,17 +572,14 @@ extern const u32 zapperR_png_size;
extern const u8 bg_music_ogg[];
extern const u32 bg_music_ogg_size;
extern const u8 button_click_wav[];
extern const u32 button_click_wav_size;
extern const u8 button_click_ogg[];
extern const u32 button_click_ogg_size;
extern const u8 button_click2_wav[];
extern const u32 button_click2_wav_size;
extern const u8 button_click2_ogg[];
extern const u32 button_click2_ogg_size;
extern const u8 button_over_wav[];
extern const u32 button_over_wav_size;
extern const u8 credits_music_ogg[];
extern const u32 credits_music_ogg_size;
extern const u8 button_over_ogg[];
extern const u32 button_over_ogg_size;
extern const u8 gc_banner_ogg[];
extern const u32 gc_banner_ogg_size;
@ -800,10 +797,9 @@ RecourceFile Resources::RecourceFiles[] =
{"zapper.png", zapper_png, zapper_png_size, NULL, 0},
{"zapperR.png", zapperR_png, zapperR_png_size, NULL, 0},
{"bg_music.ogg", bg_music_ogg, bg_music_ogg_size, NULL, 0},
{"button_click.wav", button_click_wav, button_click_wav_size, NULL, 0},
{"button_click2.wav", button_click2_wav, button_click2_wav_size, NULL, 0},
{"button_over.wav", button_over_wav, button_over_wav_size, NULL, 0},
{"credits_music.ogg", credits_music_ogg, credits_music_ogg_size, NULL, 0},
{"button_click.ogg", button_click_ogg, button_click_ogg_size, NULL, 0},
{"button_click2.ogg", button_click2_ogg, button_click2_ogg_size, NULL, 0},
{"button_over.ogg", button_over_ogg, button_over_ogg_size, NULL, 0},
{"gc_banner.ogg", gc_banner_ogg, gc_banner_ogg_size, NULL, 0},
{"menuin.ogg", menuin_ogg, menuin_ogg_size, NULL, 0},
{"menuout.ogg", menuout_ogg, menuout_ogg_size, NULL, 0},