[prev in list] [next in list] [prev in thread] [next in thread]
List: xine-cvslog
Subject: [xine-cvs] HG: xine-lib-1.2-audio-out-conversion: Port RealAudio
From: Darren Salt <linux () youmustbejoking ! demon ! co ! uk>
Date: 2007-06-22 2:55:59
Message-ID: f2b08e8a55fa5e800009.1182480632 () hg ! debian ! org
[Download RAW message or body]
# HG changeset patch
# User Darren Salt <linux@youmustbejoking.demon.co.uk>
# Date 1182480632 -3600
# Node ID f2b08e8a55fa5e8000098080a2274fcee906512a
# Parent f9be0af159b8335b2f04368f5a1a27fb9f17dc27
Port RealAudio decoder to the new interface.
diff -r f2b08e8a55fa5e8000098080a2274fcee906512a -r \
f9be0af159b8335b2f04368f5a1a27fb9f17dc27 \
src/libreal/xine_real_audio_decoder.c
--- a/src/libreal/xine_real_audio_decoder.c Fri Jun 22 03:50:32 2007 +0100
+++ b/src/libreal/xine_real_audio_decoder.c Thu Jun 21 08:29:23 2007 +0200
@@ -156,7 +156,6 @@ static int init_codec (realdec_decoder_t
int samples_per_sec, bits_per_sample, num_channels;
int subpacket_size, coded_frame_size, codec_data_length;
int coded_frame_size2, data_len, flavor;
- int mode;
void *extras;
/*
@@ -326,24 +325,19 @@ static int init_codec (realdec_decoder_t
* open audio output
*/
- switch (num_channels) {
- case 1:
- mode = AO_CAP_MODE_MONO;
- break;
- case 2:
- mode = AO_CAP_MODE_STEREO;
- break;
- default:
+ if (num_channels < 1 || num_channels > 2) {
xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
_("libareal: oups, real can do more than 2 channels ?\n"));
return 0;
}
+ const ao_format_t format = {
+ .rate = samples_per_sec,
+ .mode = _x_ao_channels2mode (num_channels),
+ .sample_format = _x_default_format_bits (bits_per_sample)
+ };
this->stream->audio_out->open(this->stream->audio_out,
- this->stream,
- bits_per_sample,
- samples_per_sec,
- mode) ;
+ this->stream, format);
this->output_open = 1;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic