Corrected stream playing with index
This commit is contained in:
parent
4b444e7cc3
commit
a8bed54586
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue