diff options
Diffstat (limited to 'src/audio_out/audio_alsa_out.c')
-rw-r--r-- | src/audio_out/audio_alsa_out.c | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index af8b4c351..abf37f1b3 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -50,10 +50,10 @@ #include <inttypes.h> #include <pthread.h> -#include "xine_internal.h" -#include "xineutils.h" -#include "compat.h" -#include "audio_out.h" +#include <xine/xine_internal.h> +#include <xine/xineutils.h> +#include <xine/compat.h> +#include <xine/audio_out.h> /* #define ALSA_LOG @@ -63,7 +63,7 @@ #define LOG_DEBUG */ -#define AO_OUT_ALSA_IFACE_VERSION 8 +#define AO_OUT_ALSA_IFACE_VERSION 9 #define BUFFER_TIME 1000*1000 #define GAP_TOLERANCE 5000 @@ -138,7 +138,7 @@ static int my_snd_mixer_wait(snd_mixer_t *mixer, int timeout) { return count; if ((unsigned int) count > sizeof(spfds) / sizeof(spfds[0])) { - pfds = malloc(count * sizeof(*pfds)); + pfds = calloc(count, sizeof(*pfds)); if (!pfds) return -ENOMEM; @@ -458,7 +458,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int this->num_channels, err, snd_strerror(err)); goto close; } -#if SND_LIB_VERSION >= 0x010009 +#if 0 /* Restrict a configuration space to contain only real hardware rates */ err = snd_pcm_hw_params_set_rate_resample(this->audio_fd, params, 0); #endif @@ -1696,22 +1696,6 @@ static void alsa_speaker_arrangement_cb (void *user_data, /* * class functions */ - -static char* get_identifier (audio_driver_class_t *this_gen) { - return "alsa"; -} - -static char* get_description (audio_driver_class_t *this_gen) { - return _("xine audio output plugin using alsa-compliant audio devices/drivers"); -} - -static void dispose_class (audio_driver_class_t *this_gen) { - - alsa_class_t *this = (alsa_class_t *) this_gen; - - free (this); -} - static void *init_class (xine_t *xine, void *data) { alsa_class_t *this; @@ -1721,9 +1705,9 @@ static void *init_class (xine_t *xine, void *data) { return NULL; this->driver_class.open_plugin = open_plugin; - this->driver_class.get_identifier = get_identifier; - this->driver_class.get_description = get_description; - this->driver_class.dispose = dispose_class; + this->driver_class.identifier = "alsa"; + this->driver_class.description = N_("xine audio output plugin using alsa-compliant audio devices/drivers"); + this->driver_class.dispose = default_audio_driver_class_dispose; /* this->config = xine->config; */ this->xine = xine; |