mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-29 22:48:31 +00:00
Review audio module and examples
This commit is contained in:
@@ -43,7 +43,8 @@ void android_main(struct android_app *app)
|
||||
|
||||
int framesCounter = 0; // Used to count frames
|
||||
|
||||
PlayMusicStream(0, "ambient.ogg");
|
||||
Music ambient = LoadMusicStream("ambient.ogg");
|
||||
PlayMusicStream(ambient);
|
||||
|
||||
SetTargetFPS(60); // Not required on Android, already locked to 60 fps
|
||||
//--------------------------------------------------------------------------------------
|
||||
@@ -53,7 +54,7 @@ void android_main(struct android_app *app)
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateMusicStream(0);
|
||||
UpdateMusicStream(ambient);
|
||||
|
||||
switch(currentScreen)
|
||||
{
|
||||
@@ -158,7 +159,8 @@ void android_main(struct android_app *app)
|
||||
|
||||
// TODO: Unload all loaded data (textures, fonts, audio) here!
|
||||
|
||||
UnloadSound(fx); // Unload sound data
|
||||
UnloadSound(fx); // Unload sound data
|
||||
UnloadMusicStream(ambient); // Unload music stream data
|
||||
|
||||
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
||||
|
||||
|
Reference in New Issue
Block a user