Skip to content

Commit bd2f2c5

Browse files
committed
Revert unrelated miniaudio whitespace changes
1 parent bd59d69 commit bd2f2c5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

vendor/miniaudio/miniaudio.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11582,7 +11582,7 @@ IMPLEMENTATION
1158211582

1158311583
#include <sys/time.h> /* select() (used for ma_sleep()). */
1158411584
#include <time.h> /* For nanosleep() */
11585-
#include <unistd.h>
11585+
#include <unistd.h>
1158611586
#endif
1158711587

1158811588
/* For fstat(), etc. */
@@ -17608,7 +17608,7 @@ static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority
1760817608
(void)stackSize; /* Suppress unused parameter warning. */
1760917609
}
1761017610
#endif
17611-
17611+
1761217612

1761317613
if (scheduler != -1) {
1761417614
int priorityMin = sched_get_priority_min(scheduler);
@@ -23047,7 +23047,7 @@ static ma_result ma_context_get_MMDevice__wasapi(ma_context* pContext, ma_device
2304723047
CoInitializeResult = ma_CoInitializeEx(pContext, NULL, MA_COINIT_VALUE);
2304823048
{
2304923049
hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
23050-
}
23050+
}
2305123051
if (CoInitializeResult == S_OK || CoInitializeResult == S_FALSE) { ma_CoUninitialize(pContext); }
2305223052

2305323053
if (FAILED(hr)) { /* <-- This is checking the call above to ma_CoCreateInstance(). */
@@ -29673,7 +29673,7 @@ static ma_result ma_device_start__alsa(ma_device* pDevice)
2967329673
}
2967429674

2967529675
if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {
29676-
/*
29676+
/*
2967729677
When data is written to the device we wait for the device to get ready to receive data with poll(). In my testing
2967829678
I have observed that poll() can sometimes block forever unless the device is started explicitly with snd_pcm_start()
2967929679
or some data is written with snd_pcm_writei().
@@ -35980,7 +35980,7 @@ static ma_result ma_device_init_internal__coreaudio(ma_context* pContext, ma_dev
3598035980
#endif
3598135981
}
3598235982

35983-
35983+
3598435984
status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, sizeof(bestFormat));
3598535985
if (status != noErr) {
3598635986
((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);
@@ -39294,7 +39294,7 @@ static void ma_stream_error_callback__aaudio(ma_AAudioStream* pStream, void* pUs
3929439294

3929539295
(void)error;
3929639296
ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] ERROR CALLBACK: error=%d, AAudioStream_getState()=%d\n", error, ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream));
39297-
39297+
3929839298
/*
3929939299
When we get an error, we'll assume that the stream is in an erroneous state and needs to be restarted. From the documentation,
3930039300
we cannot do this from the error callback. Therefore we are going to use an event thread for the AAudio backend to do this
@@ -39306,13 +39306,13 @@ static void ma_stream_error_callback__aaudio(ma_AAudioStream* pStream, void* pUs
3930639306
else {
3930739307
job = ma_job_init(MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE);
3930839308
job.data.device.aaudio.reroute.pDevice = pDevice;
39309-
39309+
3931039310
if (pStream == pDevice->aaudio.pStreamCapture) {
3931139311
job.data.device.aaudio.reroute.deviceType = ma_device_type_capture;
3931239312
} else {
3931339313
job.data.device.aaudio.reroute.deviceType = ma_device_type_playback;
3931439314
}
39315-
39315+
3931639316
result = ma_device_job_thread_post(&pDevice->pContext->aaudio.jobThread, &job);
3931739317
if (result != MA_SUCCESS) {
3931839318
ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] Device Disconnected. Failed to post job for rerouting.\n");
@@ -39909,7 +39909,7 @@ static ma_result ma_device_reinit__aaudio(ma_device* pDevice, ma_device_type dev
3990939909

3991039910
/* We got disconnected! Retry a few times, until we find a connected device! */
3991139911
iAttempt = 0;
39912-
while (iAttempt++ < maxAttempts) {
39912+
while (iAttempt++ < maxAttempts) {
3991339913
/* Device tearing down? No need to reroute! */
3991439914
if (ma_atomic_bool32_get(&pDevice->aaudio.isTearingDown)) {
3991539915
result = MA_SUCCESS; /* Caller should continue as normal. */
@@ -40007,7 +40007,7 @@ static ma_result ma_device_reinit__aaudio(ma_device* pDevice, ma_device_type dev
4000740007
break;
4000840008
}
4000940009
}
40010-
40010+
4001140011
return result;
4001240012
}
4001340013

@@ -61679,7 +61679,7 @@ static ma_result ma_default_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_inf
6167961679
ma_result result;
6168061680
ma_int64 cursor;
6168161681
ma_int64 sizeInBytes;
61682-
61682+
6168361683
result = ma_default_vfs_tell(pVFS, file, &cursor);
6168461684
if (result != MA_SUCCESS) {
6168561685
return result;

0 commit comments

Comments
 (0)