Fixed some grammar mistakes and typos. (#2914)

* Fixed some grammar mistakes.

* Fixed some typos.
This commit is contained in:
Julio C. Galindo 2023-02-09 07:17:47 -05:00 committed by GitHub
parent 5c6a756014
commit 6ae21d6581
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 111 additions and 111 deletions

View file

@ -314,7 +314,7 @@ typedef enum {
#endif
// NOTE: Different logic is used when feeding data to the playback device
// depending on whether or not data is streamed (Music vs Sound)
// depending on whether data is streamed (Music vs Sound)
typedef enum {
AUDIO_BUFFER_USAGE_STATIC = 0,
AUDIO_BUFFER_USAGE_STREAM
@ -474,7 +474,7 @@ void InitAudioDevice(void)
return;
}
// Mixing happens on a seperate thread which means we need to synchronize. I'm using a mutex here to make things simple, but may
// Mixing happens on a separate thread which means we need to synchronize. I'm using a mutex here to make things simple, but may
// want to look at something a bit smarter later on to keep everything real-time, if that's necessary.
if (ma_mutex_init(&AUDIO.System.lock) != MA_SUCCESS)
{
@ -1089,7 +1089,7 @@ void PlaySoundMulti(Sound sound)
unsigned int oldAge = 0;
int oldIndex = -1;
// find the first non playing pool entry
// find the first non-playing pool entry
for (int i = 0; i < MAX_AUDIO_BUFFER_POOL_CHANNELS; i++)
{
if (AUDIO.MultiChannel.channels[i] > oldAge)
@ -1105,7 +1105,7 @@ void PlaySoundMulti(Sound sound)
}
}
// If no none playing pool members can be index choose the oldest
// If no none playing pool members can be indexed choose the oldest
if (index == -1)
{
TRACELOG(LOG_WARNING, "SOUND: Buffer pool is already full, count: %i", AUDIO.MultiChannel.poolCounter);
@ -1113,7 +1113,7 @@ void PlaySoundMulti(Sound sound)
if (oldIndex == -1)
{
// Shouldn't be able to get here... but just in case something odd happens!
TRACELOG(LOG_WARNING, "SOUND: Buffer pool could not determine oldest buffer not playing sound");
TRACELOG(LOG_WARNING, "SOUND: Buffer pool could not determine the oldest buffer not playing sound");
return;
}
@ -2107,8 +2107,8 @@ void UnloadAudioStream(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: IsAudioStreamProcessed()
// NOTE 1: Only updates one buffer of the stream source: dequeue -> update -> queue
// NOTE 2: To dequeue a buffer it needs to be processed: IsAudioStreamProcessed()
void UpdateAudioStream(AudioStream stream, const void *data, int frameCount)
{
if (stream.buffer != NULL)
@ -2305,7 +2305,7 @@ static ma_uint32 ReadAudioBufferFramesInInternalFormat(AudioBuffer *audioBuffer,
if (currentSubBufferIndex > 1) return 0;
// Another thread can update the processed state of buffers so
// Another thread can update the processed state of buffers, so
// we just take a copy here to try and avoid potential synchronization problems
bool isSubBufferProcessed[2] = { 0 };
isSubBufferProcessed[0] = audioBuffer->isSubBufferProcessed[0];
@ -2319,7 +2319,7 @@ static ma_uint32 ReadAudioBufferFramesInInternalFormat(AudioBuffer *audioBuffer,
{
// We break from this loop differently depending on the buffer's usage
// - For static buffers, we simply fill as much data as we can
// - For streaming buffers we only fill the halves of the buffer that are processed
// - For streaming buffers we only fill half of the buffer that are processed
// Unprocessed halves must keep their audio data in-tact
if (audioBuffer->usage == AUDIO_BUFFER_USAGE_STATIC)
{
@ -2376,7 +2376,7 @@ static ma_uint32 ReadAudioBufferFramesInInternalFormat(AudioBuffer *audioBuffer,
// For static buffers we can fill the remaining frames with silence for safety, but we don't want
// to report those frames as "read". The reason for this is that the caller uses the return value
// to know whether or not a non-looping sound has finished playback.
// to know whether a non-looping sound has finished playback.
if (audioBuffer->usage != AUDIO_BUFFER_USAGE_STATIC) framesRead += totalFramesRemaining;
}