Skip to content

Commit

Permalink
fix misspells
Browse files Browse the repository at this point in the history
occured -> occurred
aquired -> acquired
accomodate -> accommodate
seperate -> separate
etc.
  • Loading branch information
a.borisov authored and mackron committed Oct 21, 2023
1 parent 0bb5681 commit fe5f17e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions extras/miniaudio_split/miniaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2221,7 +2221,7 @@ MA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat
/* First try formatting into our fixed sized stack allocated buffer. If this is too small we'll fallback to a heap allocation. */
length = vsnprintf(pFormattedMessageStack, sizeof(pFormattedMessageStack), pFormat, args);
if (length < 0) {
return MA_INVALID_OPERATION; /* An error occured when trying to convert the buffer. */
return MA_INVALID_OPERATION; /* An error occurred when trying to convert the buffer. */
}

if ((size_t)length < sizeof(pFormattedMessageStack)) {
Expand Down Expand Up @@ -11852,7 +11852,7 @@ static ma_result ma_device_read__wasapi(ma_device* pDevice, void* pFrames, ma_ui

/* At this point we should be able to loop back to the start of the loop and try retrieving a data buffer again. */
} else {
/* An error occured and we need to abort. */
/* An error occurred and we need to abort. */
ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to retrieve internal buffer from capture device in preparation for reading from the device. HRESULT = %d. Stopping device.\n", (int)hr);
result = ma_result_from_HRESULT(hr);
break;
Expand Down Expand Up @@ -57326,7 +57326,7 @@ static ma_result ma_resource_manager_data_buffer_init_ex_internal(ma_resource_ma
async = (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0;

/*
Fences need to be acquired before doing anything. These must be aquired and released outside of
Fences need to be acquired before doing anything. These must be acquired and released outside of
the node to ensure there's no holes where ma_fence_wait() could prematurely return before the
data buffer has completed initialization.

Expand Down Expand Up @@ -61089,11 +61089,11 @@ static ma_result ma_node_read_pcm_frames(ma_node* pNode, ma_uint32 outputBusInde

/*
At this point we know that we are inside our start/stop times. However, we may need to adjust
our frame count and output pointer to accomodate since we could be straddling the time period
our frame count and output pointer to accommodate since we could be straddling the time period
that this function is getting called for.

It's possible (and likely) that the start time does not line up with the output buffer. We
therefore need to offset it by a number of frames to accomodate. The same thing applies for
therefore need to offset it by a number of frames to accommodate. The same thing applies for
the stop time.
*/
timeOffsetBeg = (globalTimeBeg < startTime) ? (ma_uint32)(globalTimeEnd - startTime) : 0;
Expand Down
4 changes: 2 additions & 2 deletions extras/miniaudio_split/miniaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ MA_API void ma_resampler_uninit(ma_resampler* pResampler, const ma_allocation_ca
/*
Converts the given input data.
Both the input and output frames must be in the format specified in the config when the resampler was initilized.
Both the input and output frames must be in the format specified in the config when the resampler was initialized.
On input, [pFrameCountOut] contains the number of output frames to process. On output it contains the number of output frames that
were actually processed, which may be less than the requested amount which will happen if there's not enough input data. You can use
Expand Down Expand Up @@ -6873,7 +6873,7 @@ typedef struct
/*
Extended processing callback. This callback is used for effects that process input and output
at different rates (i.e. they perform resampling). This is similar to the simple version, only
they take two seperate frame counts: one for input, and one for output.
they take two separate frame counts: one for input, and one for output.
On input, `pFrameCountOut` is equal to the capacity of the output buffer for each bus, whereas
`pFrameCountIn` will be equal to the number of PCM frames in each of the buffers in `ppFramesIn`.
Expand Down
16 changes: 8 additions & 8 deletions miniaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -3409,7 +3409,7 @@ miniaudio supports reading from a buffer of raw audio data via the `ma_audio_buf
read from memory that's managed by the application, but can also handle the memory management for
you internally. Memory management is flexible and should support most use cases.

Audio buffers are initialised using the standard configuration system used everywhere in miniaudio:
Audio buffers are initialized using the standard configuration system used everywhere in miniaudio:

```c
ma_audio_buffer_config config = ma_audio_buffer_config_init(
Expand Down Expand Up @@ -5390,7 +5390,7 @@ MA_API void ma_resampler_uninit(ma_resampler* pResampler, const ma_allocation_ca
/*
Converts the given input data.

Both the input and output frames must be in the format specified in the config when the resampler was initilized.
Both the input and output frames must be in the format specified in the config when the resampler was initialized.

On input, [pFrameCountOut] contains the number of output frames to process. On output it contains the number of output frames that
were actually processed, which may be less than the requested amount which will happen if there's not enough input data. You can use
Expand Down Expand Up @@ -10567,7 +10567,7 @@ typedef struct
/*
Extended processing callback. This callback is used for effects that process input and output
at different rates (i.e. they perform resampling). This is similar to the simple version, only
they take two seperate frame counts: one for input, and one for output.
they take two separate frame counts: one for input, and one for output.

On input, `pFrameCountOut` is equal to the capacity of the output buffer for each bus, whereas
`pFrameCountIn` will be equal to the number of PCM frames in each of the buffers in `ppFramesIn`.
Expand Down Expand Up @@ -13637,7 +13637,7 @@ MA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat
/* First try formatting into our fixed sized stack allocated buffer. If this is too small we'll fallback to a heap allocation. */
length = vsnprintf(pFormattedMessageStack, sizeof(pFormattedMessageStack), pFormat, args);
if (length < 0) {
return MA_INVALID_OPERATION; /* An error occured when trying to convert the buffer. */
return MA_INVALID_OPERATION; /* An error occurred when trying to convert the buffer. */
}

if ((size_t)length < sizeof(pFormattedMessageStack)) {
Expand Down Expand Up @@ -23282,7 +23282,7 @@ static ma_result ma_device_read__wasapi(ma_device* pDevice, void* pFrames, ma_ui

/* At this point we should be able to loop back to the start of the loop and try retrieving a data buffer again. */
} else {
/* An error occured and we need to abort. */
/* An error occurred and we need to abort. */
ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to retrieve internal buffer from capture device in preparation for reading from the device. HRESULT = %d. Stopping device.\n", (int)hr);
result = ma_result_from_HRESULT(hr);
break;
Expand Down Expand Up @@ -68769,7 +68769,7 @@ static ma_result ma_resource_manager_data_buffer_init_ex_internal(ma_resource_ma
async = (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0;

/*
Fences need to be acquired before doing anything. These must be aquired and released outside of
Fences need to be acquired before doing anything. These must be acquired and released outside of
the node to ensure there's no holes where ma_fence_wait() could prematurely return before the
data buffer has completed initialization.

Expand Down Expand Up @@ -72532,11 +72532,11 @@ static ma_result ma_node_read_pcm_frames(ma_node* pNode, ma_uint32 outputBusInde

/*
At this point we know that we are inside our start/stop times. However, we may need to adjust
our frame count and output pointer to accomodate since we could be straddling the time period
our frame count and output pointer to accommodate since we could be straddling the time period
that this function is getting called for.

It's possible (and likely) that the start time does not line up with the output buffer. We
therefore need to offset it by a number of frames to accomodate. The same thing applies for
therefore need to offset it by a number of frames to accommodate. The same thing applies for
the stop time.
*/
timeOffsetBeg = (globalTimeBeg < startTime) ? (ma_uint32)(globalTimeEnd - startTime) : 0;
Expand Down
2 changes: 1 addition & 1 deletion tools/audioconverter/audioconverter.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ma_result do_conversion(ma_decoder* pDecoder, ma_encoder* pEncoder)
MA_ASSERT(pEncoder != NULL);

/*
All we do is read from the decoder and then write straight to the encoder. All of the neccessary data conversion
All we do is read from the decoder and then write straight to the encoder. All of the necessary data conversion
will happen internally.
*/
for (;;) {
Expand Down

0 comments on commit fe5f17e

Please sign in to comment.