git-svn-id: https://svn.eduke32.com/eduke32@453 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2007-01-12 23:24:13 +00:00
parent 7b0104e9a1
commit 197cf82051
4 changed files with 8 additions and 8 deletions

View file

@ -302,7 +302,7 @@ void intomenusounds(void)
menunum %= sizeof(menusnds)/sizeof(menusnds[0]);
}
void playmusic(char *fn)
void playmusic(const char *fn)
{
char dafn[BMAX_PATH], *dotpos;
int i;

View file

@ -197,16 +197,16 @@ void decode_layer2(mpadec_t mpadec, uint8_t *buffer)
for (k = 0; k < SBLIMIT; k++) fraction[0][j][k] = 0.5*(fraction[0][j][k] + fraction[1][j][k]);
}
if (single < 0) {
for (j = 0; j < 3; j++, (uint8_t *)buffer += mpa->synth_size) {
for (j = 0; j < 3; j++, buffer += mpa->synth_size) {
mpa->synth_func(mpa, fraction[0][j], 0, buffer);
mpa->synth_func(mpa, fraction[1][j], 1, buffer);
}
} else if (!single) {
for (j = 0; j < 3; j++, (uint8_t *)buffer += mpa->synth_size) {
for (j = 0; j < 3; j++, buffer += mpa->synth_size) {
mpa->synth_func(mpa, fraction[0][j], 0, buffer);
}
} else {
for (j = 0; j < 3; j++, (uint8_t *)buffer += mpa->synth_size) {
for (j = 0; j < 3; j++, buffer += mpa->synth_size) {
mpa->synth_func(mpa, fraction[single - 1][j], 0, buffer);
}
}

View file

@ -946,12 +946,12 @@ void decode_layer3(mpadec_t mpadec, uint8_t *buffer)
III_hybrid(mpa, grinfo, mpa->hybrid_in[ch], mpa->hybrid_out[ch], ch);
}
if (single < 0) {
for (ss = 0; ss < SSLIMIT; ss++, (uint8_t *)buffer += mpa->synth_size) {
for (ss = 0; ss < SSLIMIT; ss++, buffer += mpa->synth_size) {
mpa->synth_func(mpa, mpa->hybrid_out[0][ss], 0, buffer);
mpa->synth_func(mpa, mpa->hybrid_out[1][ss], 1, buffer);
}
} else {
for (ss = 0; ss < SSLIMIT; ss++, (uint8_t *)buffer += mpa->synth_size) {
for (ss = 0; ss < SSLIMIT; ss++, buffer += mpa->synth_size) {
mpa->synth_func(mpa, mpa->hybrid_out[0][ss], 0, buffer);
}
}

View file

@ -265,7 +265,7 @@ static int first_frame(mpadec_t mpadec)
if (mpa->frame.channels > 1) i = ((mpa->config.mode == MPADEC_CONFIG_STEREO) || (mpa->config.mode == MPADEC_CONFIG_AUTO)) ? 3 : 2;
else i = (mpa->config.mode == MPADEC_CONFIG_STEREO) ? 1 : 0;
(void *)mpa->synth_func = synth_table[mpa->config.quality][mpa->config.endian][mpa->config.format][i];
mpa->synth_func = synth_table[mpa->config.quality][mpa->config.endian][mpa->config.format][i];
mpa->sample_size = mpa->frame.decoded_channels;
switch (mpa->config.format) {
case MPADEC_CONFIG_24BIT: mpa->sample_size *= 3; scale = 0x800000; break;
@ -460,7 +460,7 @@ int MPADECAPI mpadec_configure(mpadec_t mpadec, mpadec_config_t *cfg)
decode_header(mpa, mpa->header);
if (mpa->frame.channels < 2) i = (mpa->config.mode == MPADEC_CONFIG_STEREO) ? 1 : 0;
else i = ((mpa->config.mode == MPADEC_CONFIG_STEREO) || (mpa->config.mode == MPADEC_CONFIG_AUTO)) ? 3 : 2;
(void *)mpa->synth_func = synth_table[mpa->config.quality][mpa->config.endian][mpa->config.format][i];
mpa->synth_func = synth_table[mpa->config.quality][mpa->config.endian][mpa->config.format][i];
mpa->sample_size = mpa->frame.decoded_channels;
switch (mpa->config.format) {
case MPADEC_CONFIG_24BIT: mpa->sample_size *= 3; break;