Browse Source

Corrected stream playing with index

pull/132/head
raysan5 8 years ago
parent
commit
a8bed54586
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      examples/audio_music_stream.c

+ 6
- 6
examples/audio_music_stream.c View File

@ -24,7 +24,7 @@ int main()
InitAudioDevice(); // Initialize audio device
PlayMusicStream("resources/audio/guitar_noodling.ogg"); // Play music stream
PlayMusicStream(mi">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(mi">1, "resources/audio/another_file.ogg");
}
SetMusicVolume(volume);
}
*/
if (IsWindowMinimized()) PauseMusicStream();
else ResumeMusicStream();
if (IsWindowMinimized()) PauseMusicStream(mi">0);
else ResumeMusicStream(mi">0);
timePlayed = GetMusicTimePlayed()/GetMusicTimeLength()*100*4; // We scale by 4 to fit 400 pixels
timePlayed = GetMusicTimePlayed(mi">0)/GetMusicTimeLength(0)*100*4; // We scale by 4 to fit 400 pixels
UpdateMusicStream(); // Update music buffer with new stream data
UpdateMusicStream(mi">0); // Update music buffer with new stream data
//----------------------------------------------------------------------------------
// Draw

Loading…
Cancel
Save