From 40e937c63a2a74ef2ff94ba8a056cce0a07832ed Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 29 Jul 2019 08:16:39 -0700 Subject: [PATCH] Cleanup the examples' includes --- examples/alffplay.cpp | 31 +++++++++++++++++++++++-------- examples/alhrtf.c | 7 +++++-- examples/allatency.c | 5 +++-- examples/alloopback.c | 7 +++++-- examples/almultireverb.c | 9 ++++++--- examples/alplay.c | 5 +++-- examples/alrecord.c | 1 - examples/alreverb.c | 6 ++++-- examples/alstream.c | 7 +++---- examples/common/alhelpers.c | 6 ++---- examples/common/alhelpers.h | 2 -- 11 files changed, 54 insertions(+), 32 deletions(-) diff --git a/examples/alffplay.cpp b/examples/alffplay.cpp index eb5004c6..cdb228e1 100644 --- a/examples/alffplay.cpp +++ b/examples/alffplay.cpp @@ -8,29 +8,44 @@ #include #include #include +#include #include +#include #include -#include -#include -#include +#include #include +#include +#include +#include +#include +#include +#include #include -#include -#include #include #include -#include +#include +#include +#include extern "C" { #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" #include "libavformat/avio.h" -#include "libavutil/time.h" +#include "libavformat/version.h" +#include "libavutil/avutil.h" +#include "libavutil/error.h" +#include "libavutil/frame.h" +#include "libavutil/mem.h" #include "libavutil/pixfmt.h" -#include "libavutil/avstring.h" +#include "libavutil/rational.h" +#include "libavutil/samplefmt.h" +#include "libavutil/time.h" +#include "libavutil/version.h" #include "libavutil/channel_layout.h" #include "libswscale/swscale.h" #include "libswresample/swresample.h" + +struct SwsContext; } #include "SDL.h" diff --git a/examples/alhrtf.c b/examples/alhrtf.c index f9150ae1..96cf0255 100644 --- a/examples/alhrtf.c +++ b/examples/alhrtf.c @@ -24,11 +24,14 @@ /* This file contains an example for selecting an HRTF. */ -#include #include #include +#include +#include -#include +#include "SDL_sound.h" +#include "SDL_audio.h" +#include "SDL_stdinc.h" #include "AL/al.h" #include "AL/alc.h" diff --git a/examples/allatency.c b/examples/allatency.c index d561373f..2bc76289 100644 --- a/examples/allatency.c +++ b/examples/allatency.c @@ -27,10 +27,11 @@ #include #include -#include +#include "SDL_sound.h" +#include "SDL_audio.h" +#include "SDL_stdinc.h" #include "AL/al.h" -#include "AL/alc.h" #include "AL/alext.h" #include "common/alhelpers.h" diff --git a/examples/alloopback.c b/examples/alloopback.c index 16553f9b..313b89d5 100644 --- a/examples/alloopback.c +++ b/examples/alloopback.c @@ -26,11 +26,14 @@ * output handling. */ -#include #include #include +#include -#include +#include "SDL.h" +#include "SDL_audio.h" +#include "SDL_error.h" +#include "SDL_stdinc.h" #include "AL/al.h" #include "AL/alc.h" diff --git a/examples/almultireverb.c b/examples/almultireverb.c index f1b1872f..efd3bf16 100644 --- a/examples/almultireverb.c +++ b/examples/almultireverb.c @@ -29,15 +29,18 @@ * listener. */ -#include #include #include +#include +#include -#include +#include "SDL_sound.h" +#include "SDL_audio.h" +#include "SDL_stdinc.h" #include "AL/al.h" #include "AL/alc.h" -#include "AL/alext.h" +#include "AL/efx.h" #include "AL/efx-presets.h" #include "common/alhelpers.h" diff --git a/examples/alplay.c b/examples/alplay.c index 81cb56d5..4ff8fb7f 100644 --- a/examples/alplay.c +++ b/examples/alplay.c @@ -27,10 +27,11 @@ #include #include -#include +#include "SDL_sound.h" +#include "SDL_audio.h" +#include "SDL_stdinc.h" #include "AL/al.h" -#include "AL/alc.h" #include "common/alhelpers.h" diff --git a/examples/alrecord.c b/examples/alrecord.c index c4984f99..d65414c9 100644 --- a/examples/alrecord.c +++ b/examples/alrecord.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "AL/al.h" #include "AL/alc.h" diff --git a/examples/alreverb.c b/examples/alreverb.c index e6c9e606..e1d3c207 100644 --- a/examples/alreverb.c +++ b/examples/alreverb.c @@ -27,11 +27,13 @@ #include #include -#include +#include "SDL_sound.h" +#include "SDL_audio.h" +#include "SDL_stdinc.h" #include "AL/al.h" #include "AL/alc.h" -#include "AL/alext.h" +#include "AL/efx.h" #include "AL/efx-presets.h" #include "common/alhelpers.h" diff --git a/examples/alstream.c b/examples/alstream.c index 68115e8d..cb447355 100644 --- a/examples/alstream.c +++ b/examples/alstream.c @@ -27,14 +27,13 @@ #include #include #include -#include #include -#include +#include "SDL_sound.h" +#include "SDL_audio.h" +#include "SDL_stdinc.h" #include "AL/al.h" -#include "AL/alc.h" -#include "AL/alext.h" #include "common/alhelpers.h" diff --git a/examples/common/alhelpers.c b/examples/common/alhelpers.c index 3077d0b7..b387fd2d 100644 --- a/examples/common/alhelpers.c +++ b/examples/common/alhelpers.c @@ -28,16 +28,14 @@ * finding an appropriate buffer format, and getting readable strings for * channel configs and sample types. */ -#include +#include "alhelpers.h" + #include #include #include #include "AL/al.h" #include "AL/alc.h" -#include "AL/alext.h" - -#include "alhelpers.h" /* InitAL opens a device and sets up a context using default attributes, making diff --git a/examples/common/alhelpers.h b/examples/common/alhelpers.h index 5caeda38..3752d218 100644 --- a/examples/common/alhelpers.h +++ b/examples/common/alhelpers.h @@ -1,9 +1,7 @@ #ifndef ALHELPERS_H #define ALHELPERS_H -#include "AL/alc.h" #include "AL/al.h" -#include "AL/alext.h" #ifdef __cplusplus extern "C" {