Update for SDL3 coding style (#6717)
I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base.
In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted.
The script I ran for the src directory is added as build-scripts/clang-format-src.sh
This fixes:
#6592
#6593
#6594
(cherry picked from commit 5750bcb174
)
This commit is contained in:
parent
5c4bc807f7
commit
b8d85c6939
764 changed files with 50598 additions and 54407 deletions
|
@ -18,16 +18,16 @@
|
|||
static int total_channels;
|
||||
static int active_channel;
|
||||
|
||||
#define SAMPLE_RATE_HZ 48000
|
||||
#define QUICK_TEST_TIME_MSEC 100
|
||||
#define SAMPLE_RATE_HZ 48000
|
||||
#define QUICK_TEST_TIME_MSEC 100
|
||||
#define CHANNEL_TEST_TIME_SEC 5
|
||||
#define MAX_AMPLITUDE SDL_MAX_SINT16
|
||||
#define MAX_AMPLITUDE SDL_MAX_SINT16
|
||||
|
||||
#define SINE_FREQ_HZ 500
|
||||
#define SINE_FREQ_HZ 500
|
||||
#define LFE_SINE_FREQ_HZ 50
|
||||
|
||||
/* The channel layout is defined in SDL_audio.h */
|
||||
const char*
|
||||
const char *
|
||||
get_channel_name(int channel_index, int channel_count)
|
||||
{
|
||||
switch (channel_index) {
|
||||
|
@ -92,9 +92,9 @@ is_lfe_channel(int channel_index, int channel_count)
|
|||
}
|
||||
|
||||
void SDLCALL
|
||||
fill_buffer(void* unused, Uint8* stream, int len)
|
||||
fill_buffer(void *unused, Uint8 *stream, int len)
|
||||
{
|
||||
Sint16* buffer = (Sint16*)stream;
|
||||
Sint16 *buffer = (Sint16 *)stream;
|
||||
int samples = len / sizeof(Sint16);
|
||||
static int total_samples = 0;
|
||||
int i;
|
||||
|
@ -132,8 +132,7 @@ fill_buffer(void* unused, Uint8* stream, int len)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue