diff options
| author | Ray <[email protected]> | 2019-05-14 17:57:45 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-05-14 17:57:45 +0200 |
| commit | 5a27bcaf7115e46a5123e9857007d940998f0650 (patch) | |
| tree | 7179c6a1b4d700c9685dd51cc76cb2b2c90b9609 /examples/src/audio | |
| parent | 423fdd699225ee9686c44a606bf83272b4c77802 (diff) | |
| download | raylib.com-5a27bcaf7115e46a5123e9857007d940998f0650.tar.gz raylib.com-5a27bcaf7115e46a5123e9857007d940998f0650.zip | |
Review examples collection -WIP-
WARNING: Examples list has been reviewed but examples haven't been recompiled yet... that's not trivial...
Diffstat (limited to 'examples/src/audio')
| -rw-r--r-- | examples/src/audio/audio_module_playing.c | 6 | ||||
| -rw-r--r-- | examples/src/audio/audio_music_stream.c | 2 | ||||
| -rw-r--r-- | examples/src/audio/audio_raw_stream.c | 2 |
3 files changed, 6 insertions, 4 deletions
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) * ********************************************************************************************/ |
