changeset 1096:9b4e9be457f0 trunk

[svn] - remove improper sampling rate change condition. Valid MP3s will not do this. Infact, I've never seen an MP3 that does this. Additionally, it doesn't even work with Shoutcast.
author nenolod
date Mon, 22 May 2006 16:37:39 -0700
parents dec5caa8768b
children 03dbf5494d40
files Plugins/Input/mpg123/mpg123.c
diffstat 1 files changed, 1 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/mpg123/mpg123.c	Sun May 21 12:16:21 2006 -0700
+++ b/Plugins/Input/mpg123/mpg123.c	Mon May 22 16:37:39 2006 -0700
@@ -667,7 +667,7 @@
 decode_loop(void *arg)
 {
     gboolean have_xing_header = FALSE, vbr = FALSE;
-    int disp_count = 0, temp_time;
+    int disp_count = 0;
     char *filename = arg;
     xing_header_t xing_header;
 
@@ -788,51 +788,6 @@
 
                     }
                 }
-                if (mpg123_freqs[fr.sampling_frequency] != mpg123_frequency
-                    || mpg123_stereo != fr.stereo) {
-                    memcpy(&temp_fr, &fr, sizeof(struct frame));
-                    if (mpg123_read_frame(&temp_fr) != 0) {
-                        if (fr.sampling_frequency ==
-                            temp_fr.sampling_frequency
-                            && temp_fr.stereo == fr.stereo) {
-                            mpg123_ip.output->buffer_free();
-                            mpg123_ip.output->buffer_free();
-                            while (mpg123_ip.output->buffer_playing()
-                                   && mpg123_info->going
-                                   && mpg123_info->jump_to_time == -1)
-                                xmms_usleep(20000);
-                            if (!mpg123_info->going)
-                                break;
-                            temp_time = mpg123_ip.output->output_time();
-                            mpg123_ip.output->close_audio();
-                            mpg123_frequency =
-                                mpg123_freqs[fr.sampling_frequency];
-                            mpg123_stereo = fr.stereo;
-                            if (!mpg123_ip.output->
-                                open_audio(mpg123_cfg.resolution ==
-                                           16 ? FMT_S16_NE : FMT_U8,
-                                           mpg123_freqs[fr.sampling_frequency]
-                                           >> mpg123_cfg.downsample,
-                                           mpg123_cfg.channels ==
-                                           2 ? fr.stereo : 1)) {
-                                audio_error = TRUE;
-                                mpg123_info->eof = TRUE;
-                            }
-                            mpg123_ip.output->flush(temp_time);
-                            mpg123_ip.set_info(mpg123_title, mpg123_length,
-                                               mpg123_bitrate * 1000,
-                                               mpg123_frequency,
-                                               mpg123_stereo);
-                            memcpy(&fr, &temp_fr, sizeof(struct frame));
-                        }
-                        else {
-                            memcpy(&fr, &temp_fr, sizeof(struct frame));
-                            skip_frames = 2;
-                            mpg123_info->output_audio = FALSE;
-                            continue;
-                        }
-                    }
-                }
 
                 if (tabsel_123[fr.lsf][fr.lay - 1][fr.bitrate_index] !=
                     mpg123_bitrate)