diff options
Diffstat (limited to 'examples/audio_sound_loading.c')
| -rw-r--r-- | examples/audio_sound_loading.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/audio_sound_loading.c b/examples/audio_sound_loading.c index 68f8dca9..359af0af 100644 --- a/examples/audio_sound_loading.c +++ b/examples/audio_sound_loading.c @@ -19,15 +19,15 @@ int main() //-------------------------------------------------------------------------------------- int screenWidth = 800; int screenHeight = 450; - + InitWindow(screenWidth, screenHeight, "raylib [audio] example - sound loading and playing"); - + InitAudioDevice(); // Initialize audio device - + Sound fxWav = LoadSound("resources/audio/weird.wav"); // Load WAV audio file Sound fxOgg = LoadSound("resources/audio/tanatana.ogg"); // Load OGG audio file //-------------------------------------------------------------------------------------- - + // Main game loop while (!WindowShouldClose()) // Detect window close button or ESC key { @@ -37,17 +37,17 @@ int main() if (IsKeyPressed(KEY_ENTER)) PlaySound(fxOgg); // Play OGG sound //---------------------------------------------------------------------------------- - + // Draw //---------------------------------------------------------------------------------- BeginDrawing(); - + ClearBackground(RAYWHITE); - + DrawText("Press SPACE to PLAY the WAV sound!", 200, 180, 20, LIGHTGRAY); DrawText("Press ENTER to PLAY the OGG sound!", 200, 220, 20, LIGHTGRAY); - + EndDrawing(); //---------------------------------------------------------------------------------- } @@ -56,11 +56,11 @@ int main() //-------------------------------------------------------------------------------------- UnloadSound(fxWav); // Unload sound data UnloadSound(fxOgg); // Unload sound data - + CloseAudioDevice(); // Close audio device - + CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- - + return 0; }
\ No newline at end of file |
