Browse Source

WARNING: RENAMED: IsMusicPlaying() -> IsMusicStreamPlaying()

pull/1780/head
Ray 3 years ago
parent
commit
23a08a483e
3 changed files with 5 additions and 5 deletions
  1. +3
    -3
      src/raudio.c
  2. +1
    -1
      src/raudio.h
  3. +1
    -1
      src/raylib.h

+ 3
- 3
src/raudio.c View File

@ -1540,7 +1540,7 @@ void PlayMusicStream(Music music)
// For music streams, we need to make sure we maintain the frame cursor position
// This is a hack for this section of code in UpdateMusicStream()
// NOTE: In case window is minimized, music stream is stopped, just make sure to
// play again on window restore: if (IsMusicPlaying(music)) PlayMusicStream(music);
// play again on window restore: if (IsMusicStreamPlaying(music)) PlayMusicStream(music);
ma_uint32 frameCursorPos = music.stream.buffer->frameCursorPos;
PlayAudioStream(music.stream); // WARNING: This resets the cursor position.
music.stream.buffer->frameCursorPos = frameCursorPos;
@ -1714,12 +1714,12 @@ void UpdateMusicStream(Music music)
{
// NOTE: In case window is minimized, music stream is stopped,
// just make sure to play again on window restore
if (IsMusicPlaying(music)) PlayMusicStream(music);
if (IsMusicStreamPlaying(music)) PlayMusicStream(music);
}
}
// Check if any music is playing
bool IsMusicPlaying(Music music)
bool IsMusicStreamPlaying(Music music)
{
return IsAudioStreamPlaying(music.stream);
}

+ 1
- 1
src/raudio.h View File

@ -169,7 +169,7 @@ Music LoadMusicStream(const char *fileName); // Load music st
Music LoadMusicStreamFromMemory(const char *fileType, unsigned char* data, int dataSize); // Load music stream from data
void UnloadMusicStream(Music music); // Unload music stream
void PlayMusicStream(Music music); // Start music playing
bool IsMusicPlaying(Music music); // Check if music is playing
bool IsMusicStreamPlaying(Music music); // Check if music is playing
void UpdateMusicStream(Music music); // Updates buffers for music streaming
void StopMusicStream(Music music); // Stop music playing
void PauseMusicStream(Music music); // Pause music playing

+ 1
- 1
src/raylib.h View File

@ -1502,7 +1502,7 @@ RLAPI Music LoadMusicStream(const char *fileName); // Load mu
RLAPI Music LoadMusicStreamFromMemory(const char *fileType, unsigned char* data, int dataSize); // Load music stream from data
RLAPI void UnloadMusicStream(Music music); // Unload music stream
RLAPI void PlayMusicStream(Music music); // Start music playing
RLAPI bool IsMusicPlaying(Music music); // Check if music is playing
RLAPI bool IsMusicStreamPlaying(Music music); // Check if music is playing
RLAPI void UpdateMusicStream(Music music); // Updates buffers for music streaming
RLAPI void StopMusicStream(Music music); // Stop music playing
RLAPI void PauseMusicStream(Music music); // Pause music playing

Loading…
Cancel
Save