2
0
Эх сурвалжийг харах

RENAMED: IsAudioBufferProcessed() -> IsAudioStreamProcessed()

Renamed for consistency with similar functions
raysan5 6 жил өмнө
parent
commit
c387bc586d

+ 1 - 1
examples/audio/audio_raw_stream.c

@@ -99,7 +99,7 @@ int main(void)
         }
 
         // Refill audio stream if required
-        if (IsAudioBufferProcessed(stream))
+        if (IsAudioStreamProcessed(stream))
         {
             // Synthesize a buffer that is exactly the requested size
             int writeCursor = 0;

+ 4 - 4
src/raudio.c

@@ -1418,7 +1418,7 @@ void UpdateMusicStream(Music music)
 
     int samplesCount = 0;    // Total size of data steamed in L+R samples for xm floats, individual L or R for ogg shorts
 
-    while (IsAudioBufferProcessed(music.stream))
+    while (IsAudioStreamProcessed(music.stream))
     {
         if ((music.sampleLeft/music.stream.channels) >= subBufferSizeInFrames) samplesCount = subBufferSizeInFrames*music.stream.channels;
         else samplesCount = music.sampleLeft;
@@ -1605,7 +1605,7 @@ void CloseAudioStream(AudioStream stream)
 
 // Update audio stream buffers with data
 // NOTE 1: Only updates one buffer of the stream source: unqueue -> update -> queue
-// NOTE 2: To unqueue a buffer it needs to be processed: IsAudioBufferProcessed()
+// NOTE 2: To unqueue a buffer it needs to be processed: IsAudioStreamProcessed()
 void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount)
 {
     AudioBuffer *audioBuffer = stream.buffer;
@@ -1663,11 +1663,11 @@ void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount)
 }
 
 // Check if any audio stream buffers requires refill
-bool IsAudioBufferProcessed(AudioStream stream)
+bool IsAudioStreamProcessed(AudioStream stream)
 {
     if (stream.buffer == NULL)
     {
-        TraceLog(LOG_ERROR, "IsAudioBufferProcessed() : No audio buffer");
+        TraceLog(LOG_ERROR, "IsAudioStreamProcessed() : No audio buffer");
         return false;
     }
 

+ 1 - 1
src/raylib.h

@@ -1392,7 +1392,7 @@ RLAPI float GetMusicTimePlayed(Music music);                          // Get cur
 RLAPI AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Init audio stream (to stream raw audio pcm data)
 RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount); // Update audio stream buffers with data
 RLAPI void CloseAudioStream(AudioStream stream);                      // Close audio stream and free memory
-RLAPI bool IsAudioBufferProcessed(AudioStream stream);                // Check if any audio stream buffers requires refill
+RLAPI bool IsAudioStreamProcessed(AudioStream stream);                // Check if any audio stream buffers requires refill
 RLAPI void PlayAudioStream(AudioStream stream);                       // Play audio stream
 RLAPI void PauseAudioStream(AudioStream stream);                      // Pause audio stream
 RLAPI void ResumeAudioStream(AudioStream stream);                     // Resume audio stream