summaryrefslogtreecommitdiffhomepage
path: root/examples/web/audio/audio_module_playing.c
diff options
context:
space:
mode:
authorRay <[email protected]>2019-05-18 01:27:54 +0200
committerRay <[email protected]>2019-05-18 01:27:54 +0200
commit210d5ec72bbc4ba426b21f69e6f65b6d75923d05 (patch)
treec01f6e14d673504534602c7ae9609b3dff248806 /examples/web/audio/audio_module_playing.c
parent85b11a6baf64a2b4e02c81d4d47b15eb578dc074 (diff)
downloadraylib.com-210d5ec72bbc4ba426b21f69e6f65b6d75923d05.tar.gz
raylib.com-210d5ec72bbc4ba426b21f69e6f65b6d75923d05.zip
Update examples to raylib 2.5 -WIP-
Remove old examples
Diffstat (limited to 'examples/web/audio/audio_module_playing.c')
-rw-r--r--examples/web/audio/audio_module_playing.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/examples/web/audio/audio_module_playing.c b/examples/web/audio/audio_module_playing.c
index a5af00e..5d607b8 100644
--- a/examples/web/audio/audio_module_playing.c
+++ b/examples/web/audio/audio_module_playing.c
@@ -17,10 +17,6 @@
#include <emscripten/emscripten.h>
#endif
-#if defined(PLATFORM_ANDROID)
- #include "android_native_app_glue.h"
-#endif
-
#define MAX_CIRCLES 32
//----------------------------------------------------------------------------------
@@ -59,19 +55,11 @@ void UpdateDrawFrame(void); // Update and Draw one frame
//----------------------------------------------------------------------------------
// Main Enry Point
//----------------------------------------------------------------------------------
-#if defined(PLATFORM_ANDROID)
-void android_main(struct android_app *app)
-#else
int main(void)
-#endif
{
// Initialization
//--------------------------------------------------------------------------------------
-#if defined(PLATFORM_ANDROID)
- InitWindow(screenWidth, screenHeight, app);
-#else
InitWindow(screenWidth, screenHeight, "raylib [audio] example - module playing (streaming)");
-#endif
InitAudioDevice(); // Initialize audio device
@@ -110,9 +98,8 @@ int main(void)
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
-#if !defined(PLATFORM_ANDROID)
+
return 0;
-#endif
}
//----------------------------------------------------------------------------------
@@ -142,8 +129,9 @@ void UpdateDrawFrame(void)
// Get timePlayed scaled to bar dimensions
timePlayed = GetMusicTimePlayed(xm)/GetMusicTimeLength(xm)*(screenWidth - 40);
-
- for (int i = MAX_CIRCLES - 1; i >= 0; i--)
+
+ // Color circles animation
+ for (int i = MAX_CIRCLES - 1; (i >= 0) && !pause; i--)
{
circles[i].alpha += circles[i].speed;
circles[i].radius += circles[i].speed*10.0f;