summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorChristian Hoene <christian.hoene@symonics.com>2016-05-14 12:45:49 +0200
committerChristian Hoene <christian.hoene@symonics.com>2016-05-14 12:45:49 +0200
commit0ae298b7c56183b15547141865ccb87d8889e442 (patch)
tree152caddfab1785621f0f9b1481436e6bf09a1335 /modules
parent5a7c10a7242805c1649c13453a68307bfff8f7b1 (diff)
minor nicify
Diffstat (limited to 'modules')
-rw-r--r--modules/mpa/decode.c15
-rw-r--r--modules/mpa/encode.c2
-rw-r--r--modules/mpa/mpa.c3
3 files changed, 11 insertions, 9 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;
}
diff --git a/modules/mpa/encode.c b/modules/mpa/encode.c
index 637e505..6504c38 100644
--- a/modules/mpa/encode.c
+++ b/modules/mpa/encode.c
@@ -67,7 +67,7 @@ int mpa_encode_update(struct auenc_state **aesp, const struct aucodec *ac,
prm.samplerate = 32000;
prm.bitrate = 128000;
prm.layer = 2;
- prm.mode = SINGLE_CHANNEL;
+ prm.mode = SINGLE_CHANNEL;
mpa_decode_fmtp(&prm, fmtp);
result = 0;
diff --git a/modules/mpa/mpa.c b/modules/mpa/mpa.c
index 1733a8e..7771ff6 100644
--- a/modules/mpa/mpa.c
+++ b/modules/mpa/mpa.c
@@ -82,7 +82,8 @@ static struct aucodec mpa = {
.pt = "14",
.name = "MPA",
.srate = 90000,
- .ch = 1, /* MPA does not expect channels count, even thoes it is stereo */
+ .ch = 1,
+/* MPA does not expect channels count, even thoes it is stereo */
.fmtp = "layer=2",
.encupdh = mpa_encode_update,
.ench = mpa_encode_frm,