RENAMED: IsAudioBufferProcessed() -> IsAudioStreamProcessed()
Renamed for consistency with similar functions
This commit is contained in:
parent
c629b16ebc
commit
c387bc586d
3 changed files with 6 additions and 6 deletions
|
@ -99,7 +99,7 @@ int main(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refill audio stream if required
|
// Refill audio stream if required
|
||||||
if (IsAudioBufferProcessed(stream))
|
if (IsAudioStreamProcessed(stream))
|
||||||
{
|
{
|
||||||
// Synthesize a buffer that is exactly the requested size
|
// Synthesize a buffer that is exactly the requested size
|
||||||
int writeCursor = 0;
|
int writeCursor = 0;
|
||||||
|
|
|
@ -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
|
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;
|
if ((music.sampleLeft/music.stream.channels) >= subBufferSizeInFrames) samplesCount = subBufferSizeInFrames*music.stream.channels;
|
||||||
else samplesCount = music.sampleLeft;
|
else samplesCount = music.sampleLeft;
|
||||||
|
@ -1605,7 +1605,7 @@ void CloseAudioStream(AudioStream stream)
|
||||||
|
|
||||||
// Update audio stream buffers with data
|
// Update audio stream buffers with data
|
||||||
// NOTE 1: Only updates one buffer of the stream source: unqueue -> update -> queue
|
// 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)
|
void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount)
|
||||||
{
|
{
|
||||||
AudioBuffer *audioBuffer = stream.buffer;
|
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
|
// Check if any audio stream buffers requires refill
|
||||||
bool IsAudioBufferProcessed(AudioStream stream)
|
bool IsAudioStreamProcessed(AudioStream stream)
|
||||||
{
|
{
|
||||||
if (stream.buffer == NULL)
|
if (stream.buffer == NULL)
|
||||||
{
|
{
|
||||||
TraceLog(LOG_ERROR, "IsAudioBufferProcessed() : No audio buffer");
|
TraceLog(LOG_ERROR, "IsAudioStreamProcessed() : No audio buffer");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 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 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 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 PlayAudioStream(AudioStream stream); // Play audio stream
|
||||||
RLAPI void PauseAudioStream(AudioStream stream); // Pause audio stream
|
RLAPI void PauseAudioStream(AudioStream stream); // Pause audio stream
|
||||||
RLAPI void ResumeAudioStream(AudioStream stream); // Resume audio stream
|
RLAPI void ResumeAudioStream(AudioStream stream); // Resume audio stream
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue