From 5a27bcaf7115e46a5123e9857007d940998f0650 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 14 May 2019 17:57:45 +0200 Subject: Review examples collection -WIP- WARNING: Examples list has been reviewed but examples haven't been recompiled yet... that's not trivial... --- examples/src/audio/audio_module_playing.c | 6 +++--- examples/src/audio/audio_music_stream.c | 2 ++ examples/src/audio/audio_raw_stream.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'examples/src/audio') diff --git a/examples/src/audio/audio_module_playing.c b/examples/src/audio/audio_module_playing.c index 671a119..54bfa3d 100644 --- a/examples/src/audio/audio_module_playing.c +++ b/examples/src/audio/audio_module_playing.c @@ -30,11 +30,11 @@ int main() int screenWidth = 800; int screenHeight = 450; - SetConfigFlags(FLAG_MSAA_4X_HINT); // NOTE: Try to enable MSAA 4X + SetConfigFlags(FLAG_MSAA_4X_HINT); // NOTE: Try to enable MSAA 4X InitWindow(screenWidth, screenHeight, "raylib [audio] example - module playing (streaming)"); - InitAudioDevice(); // Initialize audio device + InitAudioDevice(); // Initialize audio device Color colors[14] = { ORANGE, RED, GOLD, LIME, BLUE, VIOLET, BROWN, LIGHTGRAY, PINK, YELLOW, GREEN, SKYBLUE, PURPLE, BEIGE }; @@ -52,7 +52,7 @@ int main() circles[i].color = colors[GetRandomValue(0, 13)]; } - Music xm = LoadMusicStream("resources/mini1111.xm"); + Music xm = LoadMusicStream("resources/chiptun1.mod"); PlayMusicStream(xm); diff --git a/examples/src/audio/audio_music_stream.c b/examples/src/audio/audio_music_stream.c index f9fe23d..26450a8 100644 --- a/examples/src/audio/audio_music_stream.c +++ b/examples/src/audio/audio_music_stream.c @@ -59,6 +59,8 @@ int main() // Get timePlayed scaled to bar dimensions (400 pixels) timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*400; + + if (timePlayed > 400) StopMusicStream(music); //---------------------------------------------------------------------------------- // Draw diff --git a/examples/src/audio/audio_raw_stream.c b/examples/src/audio/audio_raw_stream.c index 7eee46f..d7fa5d7 100644 --- a/examples/src/audio/audio_raw_stream.c +++ b/examples/src/audio/audio_raw_stream.c @@ -7,7 +7,7 @@ * This example has been created using raylib 1.6 (www.raylib.com) * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) * -* Copyright (c) 2015-2018 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox) +* Copyright (c) 2015-2019 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox) * ********************************************************************************************/ -- cgit v1.2.3