diff --git a/audio/drivers/wasapi.c b/audio/drivers/wasapi.c index 2a5fb52ccb..3cd487f7ef 100644 --- a/audio/drivers/wasapi.c +++ b/audio/drivers/wasapi.c @@ -28,16 +28,16 @@ typedef struct { - bool exclusive; - bool nonblock; - bool running; - size_t frame_size; /* 4 or 8 only */ - size_t engine_buffer_size; HANDLE write_event; IMMDevice *device; IAudioClient *client; IAudioRenderClient *renderer; fifo_buffer_t *buffer; /* NULL in unbuffered shared mode */ + size_t frame_size; /* 4 or 8 only */ + size_t engine_buffer_size; + bool exclusive; + bool nonblock; + bool running; } wasapi_t; static IMMDevice *wasapi_init_device(const char *id) diff --git a/audio/drivers/xaudio.c b/audio/drivers/xaudio.c index a18858af70..b52d9a557a 100644 --- a/audio/drivers/xaudio.c +++ b/audio/drivers/xaudio.c @@ -60,9 +60,9 @@ typedef struct xaudio2 xaudio2_t; typedef struct { xaudio2_t *xa; + size_t bufsize; bool nonblock; bool is_paused; - size_t bufsize; } xa_t; /* Forward declarations */ diff --git a/libretro-common/include/audio/audio_mix.h b/libretro-common/include/audio/audio_mix.h index 081e677388..0c5af51ea4 100644 --- a/libretro-common/include/audio/audio_mix.h +++ b/libretro-common/include/audio/audio_mix.h @@ -40,19 +40,19 @@ RETRO_BEGIN_DECLS typedef struct { + double ratio; void *buf; int16_t *upsample_buf; float *float_buf; float *float_resample_buf; int16_t *resample_buf; - ssize_t len; - size_t resample_len; - rwav_t *rwav; - int sample_rate; - bool resample; const retro_resampler_t *resampler; void *resampler_data; - double ratio; + rwav_t *rwav; + ssize_t len; + size_t resample_len; + int sample_rate; + bool resample; } audio_chunk_t; #if defined(__SSE2__) diff --git a/libretro-common/include/queues/task_queue.h b/libretro-common/include/queues/task_queue.h index 0e72b15c4e..1d39cdb439 100644 --- a/libretro-common/include/queues/task_queue.h +++ b/libretro-common/include/queues/task_queue.h @@ -69,6 +69,9 @@ typedef struct struct retro_task { + /* when the task should run (0 for as soon as possible) */ + retro_time_t when; + retro_task_handler_t handler; /* always called from the main loop */ @@ -78,17 +81,6 @@ struct retro_task * be called immediately after running the main callback */ retro_task_handler_t cleanup; - /* set to true by the handler to signal - * the task has finished executing. */ - bool finished; - - /* set to true by the task system - * to signal the task *must* end. */ - bool cancelled; - - /* if true no OSD messages will be displayed. */ - bool mute; - /* created by the handler, destroyed by the user */ void *task_data; @@ -102,34 +94,42 @@ struct retro_task * (after calling the callback) */ char *error; - /* -1 = unmetered/indeterminate, 0-100 = current progress percentage */ - int8_t progress; - void (*progress_cb)(retro_task_t*); /* handler can modify but will be * free()d automatically if non-NULL. */ char *title; - enum task_type type; + /* frontend userdata + * (e.g. associate a sticky notification to a task) */ + void *frontend_userdata; + + /* don't touch this. */ + retro_task_t *next; + + /* -1 = unmetered/indeterminate, 0-100 = current progress percentage */ + int8_t progress; /* task identifier */ uint32_t ident; - /* frontend userdata - * (e.g. associate a sticky notification to a task) */ - void *frontend_userdata; + enum task_type type; /* if set to true, frontend will use an alternative look for the task progress display */ bool alternative_look; - /* don't touch this. */ - retro_task_t *next; + /* set to true by the handler to signal + * the task has finished executing. */ + bool finished; - /* when the task should run (0 for as soon as possible) */ - retro_time_t when; + /* set to true by the task system + * to signal the task *must* end. */ + bool cancelled; + + /* if true no OSD messages will be displayed. */ + bool mute; }; typedef struct task_finder_data @@ -146,10 +146,10 @@ typedef struct task_retriever_info typedef struct task_retriever_data { - retro_task_handler_t handler; - size_t element_size; - retro_task_retriever_t func; task_retriever_info_t *list; + retro_task_handler_t handler; + retro_task_retriever_t func; + size_t element_size; } task_retriever_data_t; void *task_queue_retriever_info_next(task_retriever_info_t **link);