summaryrefslogtreecommitdiffstats
path: root/libaf/af_channels.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-07 02:26:13 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-07 02:34:35 +0300
commit0eb321bf2c1cc0e048faff26a01f86cdd3ec254f (patch)
tree71cb9bd9ed121156d3382066c0722c73189afe04 /libaf/af_channels.c
parent6d908205fbadbdf7ccdc6c5e0eb918f0b43f16e0 (diff)
downloadmpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.bz2
mpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.xz
Remove trailing whitespace from most files
Diffstat (limited to 'libaf/af_channels.c')
-rw-r--r--libaf/af_channels.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/libaf/af_channels.c b/libaf/af_channels.c
index ffed84bfb0..b42cde380a 100644
--- a/libaf/af_channels.c
+++ b/libaf/af_channels.c
@@ -108,7 +108,7 @@ static void copy(void* in, void* out, int ins, int inos,int outs, int outos, int
break;
}
default:
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] Unsupported number of bytes/sample: %i"
+ mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] Unsupported number of bytes/sample: %i"
" please report this error on the MPlayer mailing list. \n",bps);
}
}
@@ -118,11 +118,11 @@ static int check_routes(af_channels_t* s, int nin, int nout)
{
int i;
if((s->nr < 1) || (s->nr > AF_NCH)){
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] The number of routing pairs must be"
+ mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] The number of routing pairs must be"
" between 1 and %i. Current value is %i\n",AF_NCH,s->nr);
return AF_ERROR;
}
-
+
for(i=0;i<s->nr;i++){
if((s->route[i][FR] >= nin) || (s->route[i][TO] >= nout)){
mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] Invalid routing in pair nr. %i.\n", i);
@@ -142,7 +142,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
// Set default channel assignment
if(!s->router){
int i;
- // Make sure this filter isn't redundant
+ // Make sure this filter isn't redundant
if(af->data->nch == ((af_data_t*)arg)->nch)
return AF_DETACH;
@@ -180,14 +180,14 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
int ch = 0;
// Sanity check
if((s->nr < 1) || (s->nr > AF_NCH)){
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] The number of routing pairs must be"
+ mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] The number of routing pairs must be"
" between 1 and %i. Current value is %i\n",AF_NCH,s->nr);
- }
+ }
s->router = 1;
// Scan for pairs on commandline
while((*cp == ':') && (ch < s->nr)){
sscanf(cp, ":%i:%i%n" ,&s->route[ch][FR], &s->route[ch][TO], &n);
- mp_msg(MSGT_AFILTER, MSGL_V, "[channels] Routing from channel %i to"
+ mp_msg(MSGT_AFILTER, MSGL_V, "[channels] Routing from channel %i to"
" channel %i\n",s->route[ch][FR],s->route[ch][TO]);
cp = &cp[n];
ch++;
@@ -197,20 +197,20 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
if(AF_OK != af->control(af,AF_CONTROL_CHANNELS | AF_CONTROL_SET ,&nch))
return AF_ERROR;
return AF_OK;
- }
- case AF_CONTROL_CHANNELS | AF_CONTROL_SET:
+ }
+ case AF_CONTROL_CHANNELS | AF_CONTROL_SET:
// Reinit must be called after this function has been called
-
+
// Sanity check
if(((int*)arg)[0] <= 0 || ((int*)arg)[0] > AF_NCH){
- mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] The number of output channels must be"
+ mp_msg(MSGT_AFILTER, MSGL_ERR, "[channels] The number of output channels must be"
" between 1 and %i. Current value is %i\n",AF_NCH,((int*)arg)[0]);
return AF_ERROR;
}
- af->data->nch=((int*)arg)[0];
+ af->data->nch=((int*)arg)[0];
if(!s->router)
- mp_msg(MSGT_AFILTER, MSGL_V, "[channels] Changing number of channels"
+ mp_msg(MSGT_AFILTER, MSGL_V, "[channels] Changing number of channels"
" to %i\n",af->data->nch);
return AF_OK;
case AF_CONTROL_CHANNELS | AF_CONTROL_GET:
@@ -246,7 +246,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
return AF_UNKNOWN;
}
-// Deallocate memory
+// Deallocate memory
static void uninit(struct af_instance_s* af)
{
free(af->setup);
@@ -262,18 +262,18 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data)
af_data_t* l = af->data; // Local data
af_channels_t* s = af->setup;
int i;
-
+
if(AF_OK != RESIZE_LOCAL_BUFFER(af,data))
return NULL;
// Reset unused channels
memset(l->audio,0,c->len / c->nch * l->nch);
-
+
if(AF_OK == check_routes(s,c->nch,l->nch))
for(i=0;i<s->nr;i++)
copy(c->audio,l->audio,c->nch,s->route[i][FR],
l->nch,s->route[i][TO],c->len,c->bps);
-
+
// Set output data
c->audio = l->audio;
c->len = c->len / c->nch * l->nch;