diff --git a/src/ao_au.c b/src/ao_au.c index 3a8690285f852724965b37cac5f90c0b81cf6270..94c9b7f3550c07c47d2e4ed0f48ad4bb15c2d65f 100644 --- a/src/ao_au.c +++ b/src/ao_au.c @@ -29,7 +29,9 @@ #include <sys/stat.h> #include <fcntl.h> #include <errno.h> -#include <unistd.h> +#ifndef _MSC_VER +# include <unistd.h> +#endif #include <ao/ao.h> #include <ao/plugin.h> @@ -81,7 +83,7 @@ typedef struct ao_au_internal } ao_au_internal; -static int ao_au_test() +static int ao_au_test(void) { return 1; /* File driver always works */ } @@ -221,13 +223,6 @@ static void ao_au_device_clear(ao_device *device) free(internal); } - -static char *ao_au_file_extension(void) -{ - return "au"; -} - - ao_functions ao_au = { ao_au_test, ao_au_driver_info, @@ -236,6 +231,5 @@ ao_functions ao_au = { ao_au_open, ao_au_play, ao_au_close, - ao_au_device_clear, - ao_au_file_extension + ao_au_device_clear }; diff --git a/src/ao_null.c b/src/ao_null.c index 942b61178894c3a5bc41386238d368bfbbfc1a2a..c4b6ab7a0a81ae1d6fab08141fc928a1970ff05f 100644 --- a/src/ao_null.c +++ b/src/ao_null.c @@ -45,7 +45,7 @@ typedef struct ao_null_internal { } ao_null_internal; -static int ao_null_test() +static int ao_null_test(void) { return 1; /* Null always works */ } diff --git a/src/ao_raw.c b/src/ao_raw.c index d9632792fa5bc78d349f7a44c714f7b06bf61c0b..c5b872c25412a7ed65cd15be00e30bb25fdecd7c 100644 --- a/src/ao_raw.c +++ b/src/ao_raw.c @@ -49,7 +49,7 @@ typedef struct ao_raw_internal } ao_raw_internal; -static int ao_raw_test() +static int ao_raw_test(void) { return 1; /* Always works */ } @@ -136,12 +136,6 @@ static void ao_raw_device_clear(ao_device *device) } -static char *ao_raw_file_extension(void) -{ - return "raw"; -} - - ao_functions ao_raw = { ao_raw_test, ao_raw_driver_info, @@ -150,6 +144,5 @@ ao_functions ao_raw = { ao_raw_open, ao_raw_play, ao_raw_close, - ao_raw_device_clear, - ao_raw_file_extension + ao_raw_device_clear }; diff --git a/src/ao_wav.c b/src/ao_wav.c index e611f57eb573f8fda380a94e39157efa07a3f33e..f816b220dc9bd1b9a7dbcabe28246cce233f26f9 100644 --- a/src/ao_wav.c +++ b/src/ao_wav.c @@ -99,7 +99,7 @@ typedef struct ao_wav_internal } ao_wav_internal; -static int ao_wav_test() +static int ao_wav_test(void) { return 1; /* File driver always works */ } @@ -257,12 +257,6 @@ static void ao_wav_device_clear(ao_device *device) } -static char *ao_wav_file_extension(void) -{ - return "wav"; -} - - ao_functions ao_wav = { ao_wav_test, ao_wav_driver_info, @@ -271,6 +265,6 @@ ao_functions ao_wav = { ao_wav_open, ao_wav_play, ao_wav_close, - ao_wav_device_clear, - ao_wav_file_extension + ao_wav_device_clear }; + diff --git a/src/audio_out.c b/src/audio_out.c index 56279e5fa4d565863d1c05d1bb3a6deec679ae29..a81ae1664450160f1a50b4e9afc75b2ad6262216 100644 --- a/src/audio_out.c +++ b/src/audio_out.c @@ -30,14 +30,17 @@ #include <dlfcn.h> #include <sys/types.h> #include <sys/stat.h> -#include <unistd.h> +#ifndef _MSC_VER +# include <unistd.h> +#endif #include <dirent.h> + #include "ao/ao.h" #include "ao_private.h" /* These should have been set by the Makefile */ #ifndef AO_PLUGIN_PATH -#define AO_PLUGIN_PATH "/usr/local/lib/ao/plugins" +#define AO_PLUGIN_PATH "/usr/local/lib/ao" #endif #ifndef SHARED_LIB_EXT #define SHARED_LIB_EXT ".so" @@ -137,11 +140,6 @@ driver_list *_get_plugin(char *plugin_file) dlsym(dt->handle, "ao_plugin_device_clear"); if (dlerror()) { free(dt->functions); free(dt); return NULL; } - /* Optional function */ - dt->functions->file_extension = - dlsym(dt->handle, "ao_plugin_file_extension"); - if (dlerror()) { dt->functions->file_extension = NULL; } - } else { return NULL; @@ -394,7 +392,7 @@ int _realloc_swap_buffer(ao_device *device, int min_size) the target buffer. */ void _swap_samples(char *target_buffer, char* source_buffer, uint_32 num_bytes) { - int i; + uint_32 i; for (i = 0; i < num_bytes; i += 2) { target_buffer[i] = source_buffer[i+1]; @@ -703,18 +701,6 @@ ao_info **ao_driver_info_list(int *count) } -char *ao_file_extension(int driver_id) -{ - driver_list *driver; - - if ( (driver = _get_driver(driver_id)) - && driver->functions->file_extension != NULL) - return driver->functions->file_extension(); - else - return NULL; -} - - /* -- Miscellaneous -- */ /* Stolen from Vorbis' lib/vorbisfile.c */