From f991a075e18df5e58bd6f6f90c1b02b5b353cbe3 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Sat, 25 Nov 2017 20:27:53 +0100 Subject: Build examples and games on Travis CI They were disabled because they failed to build, but this patch set fixes the build on Linux and macOS. This doesn't apply to the AppVeyor build on Windows yet; it currently fails at linking with OpenAL. --- examples/others/audio_standalone.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'examples/others/audio_standalone.c') diff --git a/examples/others/audio_standalone.c b/examples/others/audio_standalone.c index 0a09c988..97c3fd0d 100644 --- a/examples/others/audio_standalone.c +++ b/examples/others/audio_standalone.c @@ -26,14 +26,11 @@ ********************************************************************************************/ #include +#include "audio.h" #if defined(_WIN32) #include // Windows only, no stardard library -#endif - -#include "audio.h" - -#if defined(__linux__) +#else #include #include #include -- cgit v1.2.3 From 8cb324b2da063fb4dac29b4d2a5495fdbe78351a Mon Sep 17 00:00:00 2001 From: "maficccc@gmail.com" Date: Sun, 4 Mar 2018 16:26:49 +0100 Subject: Fix result of operation is garbage or undefined --- examples/others/audio_standalone.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'examples/others/audio_standalone.c') diff --git a/examples/others/audio_standalone.c b/examples/others/audio_standalone.c index 97c3fd0d..38fe9935 100644 --- a/examples/others/audio_standalone.c +++ b/examples/others/audio_standalone.c @@ -76,13 +76,13 @@ int main() { // Initialization //-------------------------------------------------------------------------------------- - unsigned char key; - + static unsigned char key; + InitAudioDevice(); - + Sound fxWav = LoadSound("resources/audio/weird.wav"); // Load WAV audio file Sound fxOgg = LoadSound("resources/audio/tanatana.ogg"); // Load OGG audio file - + Music music = LoadMusicStream("resources/audio/guitar_noodling.ogg"); PlayMusicStream(music); @@ -99,23 +99,23 @@ int main() PlaySound(fxWav); key = 0; } - + if (key == 'd') { PlaySound(fxOgg); key = 0; } - + UpdateMusicStream(music); } - + // De-Initialization //-------------------------------------------------------------------------------------- UnloadSound(fxWav); // Unload sound data UnloadSound(fxOgg); // Unload sound data - + UnloadMusicStream(music); // Unload music stream data - + CloseAudioDevice(); //-------------------------------------------------------------------------------------- -- cgit v1.2.3