mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
fix misspells
occured -> occurred aquired -> acquired accomodate -> accommodate seperate -> separate etc.
This commit is contained in:
@@ -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. */
|
/* 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);
|
length = vsnprintf(pFormattedMessageStack, sizeof(pFormattedMessageStack), pFormat, args);
|
||||||
if (length < 0) {
|
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)) {
|
if ((size_t)length < sizeof(pFormattedMessageStack)) {
|
||||||
@@ -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. */
|
/* At this point we should be able to loop back to the start of the loop and try retrieving a data buffer again. */
|
||||||
} else {
|
} 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);
|
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);
|
result = ma_result_from_HRESULT(hr);
|
||||||
break;
|
break;
|
||||||
@@ -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;
|
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
|
the node to ensure there's no holes where ma_fence_wait() could prematurely return before the
|
||||||
data buffer has completed initialization.
|
data buffer has completed initialization.
|
||||||
|
|
||||||
@@ -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
|
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.
|
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
|
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.
|
the stop time.
|
||||||
*/
|
*/
|
||||||
timeOffsetBeg = (globalTimeBeg < startTime) ? (ma_uint32)(globalTimeEnd - startTime) : 0;
|
timeOffsetBeg = (globalTimeBeg < startTime) ? (ma_uint32)(globalTimeEnd - startTime) : 0;
|
||||||
|
|||||||
@@ -1694,7 +1694,7 @@ MA_API void ma_resampler_uninit(ma_resampler* pResampler, const ma_allocation_ca
|
|||||||
/*
|
/*
|
||||||
Converts the given input data.
|
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
|
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
|
were actually processed, which may be less than the requested amount which will happen if there's not enough input data. You can use
|
||||||
@@ -6873,7 +6873,7 @@ typedef struct
|
|||||||
/*
|
/*
|
||||||
Extended processing callback. This callback is used for effects that process input and output
|
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
|
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
|
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`.
|
`pFrameCountIn` will be equal to the number of PCM frames in each of the buffers in `ppFramesIn`.
|
||||||
|
|||||||
+8
-8
@@ -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
|
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.
|
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
|
```c
|
||||||
ma_audio_buffer_config config = ma_audio_buffer_config_init(
|
ma_audio_buffer_config config = ma_audio_buffer_config_init(
|
||||||
@@ -5390,7 +5390,7 @@ MA_API void ma_resampler_uninit(ma_resampler* pResampler, const ma_allocation_ca
|
|||||||
/*
|
/*
|
||||||
Converts the given input data.
|
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
|
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
|
were actually processed, which may be less than the requested amount which will happen if there's not enough input data. You can use
|
||||||
@@ -10567,7 +10567,7 @@ typedef struct
|
|||||||
/*
|
/*
|
||||||
Extended processing callback. This callback is used for effects that process input and output
|
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
|
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
|
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`.
|
`pFrameCountIn` will be equal to the number of PCM frames in each of the buffers in `ppFramesIn`.
|
||||||
@@ -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. */
|
/* 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);
|
length = vsnprintf(pFormattedMessageStack, sizeof(pFormattedMessageStack), pFormat, args);
|
||||||
if (length < 0) {
|
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)) {
|
if ((size_t)length < sizeof(pFormattedMessageStack)) {
|
||||||
@@ -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. */
|
/* At this point we should be able to loop back to the start of the loop and try retrieving a data buffer again. */
|
||||||
} else {
|
} 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);
|
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);
|
result = ma_result_from_HRESULT(hr);
|
||||||
break;
|
break;
|
||||||
@@ -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;
|
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
|
the node to ensure there's no holes where ma_fence_wait() could prematurely return before the
|
||||||
data buffer has completed initialization.
|
data buffer has completed initialization.
|
||||||
|
|
||||||
@@ -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
|
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.
|
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
|
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.
|
the stop time.
|
||||||
*/
|
*/
|
||||||
timeOffsetBeg = (globalTimeBeg < startTime) ? (ma_uint32)(globalTimeEnd - startTime) : 0;
|
timeOffsetBeg = (globalTimeBeg < startTime) ? (ma_uint32)(globalTimeEnd - startTime) : 0;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ ma_result do_conversion(ma_decoder* pDecoder, ma_encoder* pEncoder)
|
|||||||
MA_ASSERT(pEncoder != NULL);
|
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.
|
will happen internally.
|
||||||
*/
|
*/
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|||||||
Reference in New Issue
Block a user