diff options
author | Christian Hoene <christian.hoene@symonics.com> | 2016-05-14 12:45:49 +0200 |
---|---|---|
committer | Christian Hoene <christian.hoene@symonics.com> | 2016-05-14 12:45:49 +0200 |
commit | 0ae298b7c56183b15547141865ccb87d8889e442 (patch) | |
tree | 152caddfab1785621f0f9b1481436e6bf09a1335 /modules/mpa/decode.c | |
parent | 5a7c10a7242805c1649c13453a68307bfff8f7b1 (diff) |
minor nicify
Diffstat (limited to 'modules/mpa/decode.c')
-rw-r--r-- | modules/mpa/decode.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/mpa/decode.c b/modules/mpa/decode.c index c45bbf6..3a1c0a2 100644 --- a/modules/mpa/decode.c +++ b/modules/mpa/decode.c @@ -162,8 +162,8 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc, else ads->resampler = NULL; } - else if (result == MPG123_NEED_MORE) - ; /* workaround: do nothing */ + else if (result == MPG123_NEED_MORE) + ; /* workaround: do nothing */ else if (result != MPG123_OK) { error("MPA dec feed error %d %s\n", result, mpg123_plain_strerror(result)); @@ -174,7 +174,7 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc, intermediate_len = n / 2 / ads->channels; /* intermediate_len counts samples per channel */ out_len = *sampc / 2; - + result=speex_resampler_process_interleaved_int( ads->resampler, ads->intermediate_buffer, &intermediate_len, sampv, &out_len); @@ -193,14 +193,15 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc, } else { n /= 2; - if(ads->channels!=1) { - for(i=0;(unsigned)i<n;i++) + if (ads->channels!=1) { + for (i=0;(unsigned)i<n;i++) sampv[i]=ads->intermediate_buffer[i]; *sampc = n; } else { - for(i=0;(unsigned)i<n;i++) - sampv[i*2]=sampv[i*2+1]=ads->intermediate_buffer[i]; + for (i=0;(unsigned)i<n;i++) + sampv[i*2]=sampv[i*2+1]= + ads->intermediate_buffer[i]; *sampc = n * 2; } |