mirror of
https://github.com/switchbrew/switch-examples.git
synced 2025-07-01 09:12:14 +02:00
romfs added
This commit is contained in:
parent
3c3a0b3f5a
commit
1fbda95f43
@ -42,7 +42,7 @@ BUILD := build
|
||||
SOURCES := source
|
||||
DATA := data
|
||||
INCLUDES := include
|
||||
#ROMFS := romfs
|
||||
ROMFS := romfs
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
|
BIN
audio/sdl2-audio/romfs/test.mp3
Normal file
BIN
audio/sdl2-audio/romfs/test.mp3
Normal file
Binary file not shown.
@ -17,6 +17,12 @@ int main(int argc, char* argv[])
|
||||
|
||||
consoleInit(NULL);
|
||||
|
||||
|
||||
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
|
||||
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user