summaryrefslogtreecommitdiffstats
path: root/libao2/ao_alsa5.c
diff options
context:
space:
mode:
Diffstat (limited to 'libao2/ao_alsa5.c')
-rw-r--r--libao2/ao_alsa5.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libao2/ao_alsa5.c b/libao2/ao_alsa5.c
index bca4e93ed8..b2dc1efd3a 100644
--- a/libao2/ao_alsa5.c
+++ b/libao2/ao_alsa5.c
@@ -32,7 +32,7 @@
#include "mp_msg.h"
#include "help_mp.h"
-static const ao_info_t info =
+static const ao_info_t info =
{
"ALSA-0.5.x audio output",
"alsa5",
@@ -117,7 +117,7 @@ static int init(int rate_hz, int channels, int format, int flags)
alsa_format.format = SND_PCM_SFMT_MPEG;
break;
}
-
+
switch(alsa_format.format)
{
case SND_PCM_SFMT_S16_LE:
@@ -230,7 +230,7 @@ static int init(int rate_hz, int channels, int format, int flags)
setup.format = alsa_format;
setup.buf.stream.queue_size = ao_data.buffersize;
setup.msbits_per_sample = ao_data.bps;
-
+
if ((err = snd_pcm_channel_setup(alsa_handler, &setup)) < 0)
{
mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-init: error setting up channel: %s\n", snd_strerror(err));
@@ -333,10 +333,10 @@ static void audio_resume(void)
static int play(void* data, int len, int flags)
{
int got_len;
-
+
if (!len)
return 0;
-
+
if ((got_len = snd_pcm_write(alsa_handler, data, len)) < 0)
{
if (got_len == -EPIPE) /* underrun? */
@@ -365,7 +365,7 @@ static int play(void* data, int len, int flags)
static int get_space(void)
{
snd_pcm_channel_status_t ch_stat;
-
+
ch_stat.channel = SND_PCM_CHANNEL_PLAYBACK;
if (snd_pcm_channel_status(alsa_handler, &ch_stat) < 0)
@@ -378,9 +378,9 @@ static int get_space(void)
static float get_delay(void)
{
snd_pcm_channel_status_t ch_stat;
-
+
ch_stat.channel = SND_PCM_CHANNEL_PLAYBACK;
-
+
if (snd_pcm_channel_status(alsa_handler, &ch_stat) < 0)
return (float)ao_data.buffersize/(float)ao_data.bps; /* error occurred */
else