romfs added

This commit is contained in:
jonyluke 2019-05-17 18:03:37 +02:00
parent 3c3a0b3f5a
commit 1fbda95f43
3 changed files with 10 additions and 3 deletions

View File

@ -42,7 +42,7 @@ BUILD := build
SOURCES := source
DATA := data
INCLUDES := include
#ROMFS := romfs
ROMFS := romfs
#---------------------------------------------------------------------------------
# options for code generation

Binary file not shown.

View File

@ -17,7 +17,13 @@ int main(int argc, char* argv[])
consoleInit(NULL);
printf("Press A button to play the sound!\n");
Result rc = romfsInit();
if (R_FAILED(rc))
printf("romfsInit: %08X\n", rc);
else
printf("Press A button to play the sound!\n");
// Start SDL with audio support
SDL_Init(SDL_INIT_AUDIO);
@ -30,7 +36,8 @@ int main(int argc, char* argv[])
Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 4096);
// Load sound file to use
Mix_Music *audio = Mix_LoadMUS("test.mp3");
//Sound from https://freesound.org/people/jens.enk/sounds/434610/
Mix_Music *audio = Mix_LoadMUS("romfs:/test.mp3");
// Main loop
while (appletMainLoop())