summaryrefslogtreecommitdiffstats
path: root/libao2/ao_sun.c
diff options
context:
space:
mode:
Diffstat (limited to 'libao2/ao_sun.c')
-rw-r--r--libao2/ao_sun.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/libao2/ao_sun.c b/libao2/ao_sun.c
index d2da673177..72353bc736 100644
--- a/libao2/ao_sun.c
+++ b/libao2/ao_sun.c
@@ -49,7 +49,7 @@
#include "mp_msg.h"
#include "help_mp.h"
-static const ao_info_t info =
+static const ao_info_t info =
{
"Sun audio output",
"sun",
@@ -142,7 +142,7 @@ static int realtime_samplecounter_available(char *dev)
silence = calloc(1, len);
if (silence == NULL)
goto error;
-
+
if ((fd = open(dev, O_WRONLY)) < 0)
goto error;
@@ -157,7 +157,7 @@ static int realtime_samplecounter_available(char *dev)
mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SUN] rtsc: SETINFO failed.\n");
goto error;
}
-
+
if (write(fd, silence, len) != len) {
if ( mp_msg_test(MSGT_AO,MSGL_V) )
mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SUN] rtsc: write failed.\n");
@@ -215,7 +215,7 @@ static int realtime_samplecounter_available(char *dev)
* sample counter increment from the soundcard driver of less than
* 2000 samples, we assume that the driver provides a useable realtime
* sample counter in the AUDIO_INFO play.samples field. Timing based
- * on sample counts should be much more accurate than counting whole
+ * on sample counts should be much more accurate than counting whole
* 16kbyte chunks.
*/
if (min_increment < 2000)
@@ -225,7 +225,7 @@ static int realtime_samplecounter_available(char *dev)
mp_msg(MSGT_AO,MSGL_V,"ao_sun: minimum sample counter increment per 10msec interval: %d\n"
"\t%susing sample counter based timing code\n",
min_increment, rtsc_ok == RTSC_ENABLED ? "" : "not ");
-
+
error:
if (silence != NULL) free(silence);
@@ -272,7 +272,7 @@ find_close_samplerate_match(int dev, unsigned sample_rate)
if (sr->flags & MIXER_SR_LIMITS) {
/*
- * HW can playback any rate between
+ * HW can playback any rate between
* sr->samp_rates[0] .. sr->samp_rates[1]
*/
free(sr);
@@ -318,7 +318,7 @@ find_close_samplerate_match(int dev, unsigned sample_rate)
for (i = 0; audiocs_rates[i]; i++) {
err = abs(audiocs_rates[i] - sample_rate);
if (err == 0) {
- /*
+ /*
* exact supported sample rate match, no need to
* retry something elise
*/
@@ -361,7 +361,7 @@ find_highest_samplerate(int dev)
if (sr->flags & MIXER_SR_LIMITS) {
/*
- * HW can playback any rate between
+ * HW can playback any rate between
* sr->samp_rates[0] .. sr->samp_rates[1]
*/
max_rate = sr->samp_rates[1];
@@ -435,7 +435,7 @@ static int control(int cmd,void *arg){
}
close( fd );
return CONTROL_OK;
- }
+ }
return CONTROL_ERROR;
}
case AOCONTROL_SET_VOLUME:
@@ -466,7 +466,7 @@ static int control(int cmd,void *arg){
ioctl( fd,AUDIO_SETINFO,&info );
close( fd );
return CONTROL_OK;
- }
+ }
return CONTROL_ERROR;
}
}
@@ -516,7 +516,7 @@ static int init(int rate,int channels,int format,int flags){
if (pass & 1) {
/*
- * on some sun audio drivers, 8-bit unsigned LINEAR8 encoding is
+ * on some sun audio drivers, 8-bit unsigned LINEAR8 encoding is
* not supported, but 8-bit signed encoding is.
*
* Try S8, and if it works, use our own U8->S8 conversion before
@@ -539,7 +539,7 @@ static int init(int rate,int channels,int format,int flags){
* supported rates, use the fixed supported rate instead.
*/
if (!(info.play.sample_rate =
- find_close_samplerate_match(audio_fd, rate)))
+ find_close_samplerate_match(audio_fd, rate)))
continue;
/*
@@ -694,4 +694,3 @@ static float get_delay(void){
return (float)((queued_bursts - info.play.eof) * ao_data.outburst) / (float)byte_per_sec;
#endif
}
-