summaryrefslogtreecommitdiff
path: root/src/liblpcm/xine_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblpcm/xine_decoder.c')
-rw-r--r--src/liblpcm/xine_decoder.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/liblpcm/xine_decoder.c b/src/liblpcm/xine_decoder.c
index 89a34fc35..62698bacc 100644
--- a/src/liblpcm/xine_decoder.c
+++ b/src/liblpcm/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.7 2001/09/06 13:36:18 jkeil Exp $
+ * $Id: xine_decoder.c,v 1.8 2001/09/10 03:04:48 guenter Exp $
*
* 31-8-2001 Added LPCM rate sensing.
* (c) 2001 James Courtier-Dutton James@superbug.demon.co.uk
@@ -83,13 +83,17 @@ void lpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
int stream_be;
this->pts = buf->PTS;
- this->rate=buf->decoder_info[1];
- this->bits_per_sample=buf->decoder_info[2] ;
- this->number_of_channels=buf->decoder_info[3] ;
- this->ao_cap_mode=(this->number_of_channels == 2) ? AO_CAP_MODE_STEREO : AO_CAP_MODE_MONO;
- if (buf->decoder_info[0] == 0)
+ if (buf->decoder_info[0] == 0) {
+ this->rate=buf->decoder_info[1];
+ this->bits_per_sample=buf->decoder_info[2] ;
+ this->number_of_channels=buf->decoder_info[3] ;
+ this->ao_cap_mode=(this->number_of_channels == 2) ? AO_CAP_MODE_STEREO : AO_CAP_MODE_MONO;
return;
+ }
+
if (!this->output_open) {
+ printf ("liblpcm: opening audio output (%d Hz sampling rate, mode=%d)\n",
+ this->rate, this->ao_cap_mode);
this->output_open = (this->audio_out->open (this->audio_out, this->bits_per_sample,
this->rate,
this->ao_cap_mode) == 1);