diff options
| author | raysan5 <raysan5@gmail.com> | 2016-06-27 18:30:18 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-06-27 18:30:18 +0200 |
| commit | a8bed54586d721cb08dacceedcd669afcf582e67 (patch) | |
| tree | 8789a08ba18ae1fe217e5f30cedec272c92fdc75 | |
| parent | 4b444e7cc395378b1545ae0a240dd21135b5e434 (diff) | |
| download | raylib-a8bed54586d721cb08dacceedcd669afcf582e67.tar.gz raylib-a8bed54586d721cb08dacceedcd669afcf582e67.zip | |
Corrected stream playing with index
| -rw-r--r-- | examples/audio_music_stream.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/audio_music_stream.c b/examples/audio_music_stream.c index 8c668cce..e135a6e4 100644 --- a/examples/audio_music_stream.c +++ b/examples/audio_music_stream.c @@ -24,7 +24,7 @@ int main() InitAudioDevice(); // Initialize audio device - PlayMusicStream("resources/audio/guitar_noodling.ogg"); // Play music stream + PlayMusicStream(0, "resources/audio/guitar_noodling.ogg"); // Play music stream int framesCounter = 0; float timePlayed = 0.0f; @@ -52,18 +52,18 @@ int main() { volume = 1.0; framesCounter = 0; - PlayMusicStream("resources/audio/another_file.ogg"); + PlayMusicStream(1, "resources/audio/another_file.ogg"); } SetMusicVolume(volume); } */ - if (IsWindowMinimized()) PauseMusicStream(); - else ResumeMusicStream(); + if (IsWindowMinimized()) PauseMusicStream(0); + else ResumeMusicStream(0); - timePlayed = GetMusicTimePlayed()/GetMusicTimeLength()*100*4; // We scale by 4 to fit 400 pixels + timePlayed = GetMusicTimePlayed(0)/GetMusicTimeLength(0)*100*4; // We scale by 4 to fit 400 pixels - UpdateMusicStream(); // Update music buffer with new stream data + UpdateMusicStream(0); // Update music buffer with new stream data //---------------------------------------------------------------------------------- // Draw |
