summaryrefslogtreecommitdiffstats
path: root/mix
diff options
context:
space:
mode:
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-11-21 02:11:44 +0100
committerDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-11-21 13:07:03 +0100
commit9d65155c28d4a47022a4de7e604187b8b2ad2137 (patch)
treee36aa03bed80065259ca8bfcde0662116c1dc26f /mix
parente4ce5402202d983a84d01555445eeb23e5a9268f (diff)
Make some static tables and strings constants.
By doing this we move them from the .data section to .rodata setion, or from .data.rel to .data.rel.ro. The .rodata section is mapped directly from the on-disk file, which is always a save, while .data.rel.ro is mapped directly when using prelink, which is a save in a lot of cases. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
Diffstat (limited to 'mix')
-rw-r--r--mix/pcm_upmix.c6
-rw-r--r--mix/pcm_vdownmix.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/mix/pcm_upmix.c b/mix/pcm_upmix.c
index 66e6604..7338426 100644
--- a/mix/pcm_upmix.c
+++ b/mix/pcm_upmix.c
@@ -260,7 +260,7 @@ static void upmix_6_to_51(snd_pcm_upmix_t *mix ATTRIBUTE_UNUSED,
6, size, SND_PCM_FORMAT_S16);
}
-static upmixer_t do_upmix[6][2] = {
+static const upmixer_t do_upmix[6][2] = {
{ upmix_1_to_40, upmix_1_to_51 },
{ upmix_2_to_40, upmix_2_to_51 },
{ upmix_3_to_40, upmix_3_to_51 },
@@ -317,7 +317,7 @@ static int upmix_close(snd_pcm_extplug_t *ext)
return 0;
}
-static snd_pcm_extplug_callback_t upmix_callback = {
+static const snd_pcm_extplug_callback_t upmix_callback = {
.transfer = upmix_transfer,
.init = upmix_init,
.close = upmix_close,
@@ -328,7 +328,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(upmix)
snd_config_iterator_t i, next;
snd_pcm_upmix_t *mix;
snd_config_t *sconf = NULL;
- static unsigned int chlist[2] = {4, 6};
+ static const unsigned int chlist[2] = {4, 6};
unsigned int channels = 0;
int delay = 10;
int err;
diff --git a/mix/pcm_vdownmix.c b/mix/pcm_vdownmix.c
index d5648cf..85eafad 100644
--- a/mix/pcm_vdownmix.c
+++ b/mix/pcm_vdownmix.c
@@ -49,7 +49,7 @@ typedef struct {
short rbuf[RINGBUF_SIZE][5];
} snd_pcm_vdownmix_t;
-static struct vdownmix_filter tap_filters[5] = {
+static const struct vdownmix_filter tap_filters[5] = {
{
#ifdef I_AM_POWERFUL
18,
@@ -183,7 +183,7 @@ static struct vdownmix_filter tap_filters[5] = {
},
};
-static int tap_index[5][2] = {
+static const int tap_index[5][2] = {
/* left */
{ 0, 1 },
/* right */
@@ -277,7 +277,7 @@ static int vdownmix_init(snd_pcm_extplug_t *ext)
return 0;
}
-static snd_pcm_extplug_callback_t vdownmix_callback = {
+static const snd_pcm_extplug_callback_t vdownmix_callback = {
.transfer = vdownmix_transfer,
.init = vdownmix_init,
/* .dump = filr_dump, */