mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-08 12:28:15 +00:00
Corrected stream playing with index
This commit is contained in:
@@ -24,7 +24,7 @@ int main()
|
|||||||
|
|
||||||
InitAudioDevice(); // Initialize audio device
|
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;
|
int framesCounter = 0;
|
||||||
float timePlayed = 0.0f;
|
float timePlayed = 0.0f;
|
||||||
@@ -52,18 +52,18 @@ int main()
|
|||||||
{
|
{
|
||||||
volume = 1.0;
|
volume = 1.0;
|
||||||
framesCounter = 0;
|
framesCounter = 0;
|
||||||
PlayMusicStream("resources/audio/another_file.ogg");
|
PlayMusicStream(1, "resources/audio/another_file.ogg");
|
||||||
}
|
}
|
||||||
|
|
||||||
SetMusicVolume(volume);
|
SetMusicVolume(volume);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (IsWindowMinimized()) PauseMusicStream();
|
if (IsWindowMinimized()) PauseMusicStream(0);
|
||||||
else ResumeMusicStream();
|
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
|
// Draw
|
||||||
|
Reference in New Issue
Block a user