summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/audio_out.c19
-rw-r--r--src/xine-engine/buffer.h3
2 files changed, 19 insertions, 3 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 69f6136d7..cb9846410 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.11 2001/09/06 13:33:20 jkeil Exp $
+ * $Id: audio_out.c,v 1.12 2001/09/06 15:26:07 joachim_koenig Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -304,7 +304,7 @@ static int ao_write(ao_instance_t *this,
if (!bDropPackage) {
int num_output_frames = (double) num_frames * this->frame_rate_factor;
- if ((!this->do_resample) && (this->mode != AO_CAP_MODE_A52)) {
+ if ((!this->do_resample) && (this->mode != AO_CAP_MODE_A52) && (this->mode != AO_CAP_MODE_AC5)) {
xprintf (VERBOSE|AUDIO, "audio_out: writing without resampling\n");
this->driver->write (this->driver, output_frames,
num_output_frames );
@@ -351,6 +351,21 @@ static int ao_write(ao_instance_t *this,
this->driver->write(this->driver, this->frame_buffer, 1536);
break;
+ case AO_CAP_MODE_AC5:
+ memset(this->frame_buffer,0xff,6144);
+ this->frame_buffer[0] = 0xf872; /* spdif syncword */
+ this->frame_buffer[1] = 0x4e1f; /* ............. */
+ this->frame_buffer[2] = 0x0001; /* */
+
+ this->frame_buffer[3] = 0x3ee0;
+
+ /* ac3 seems to be swabbed data */
+ swab(output_frames,this->frame_buffer+4, 2014 );
+
+ this->driver->write(this->driver, this->frame_buffer, 1012);
+
+ break;
+
}
xprintf (AUDIO|VERBOSE, "audio_out :audio package written\n");
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index 9cd17add0..938c3e339 100644
--- a/src/xine-engine/buffer.h
+++ b/src/xine-engine/buffer.h
@@ -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: buffer.h,v 1.8 2001/09/01 14:33:00 guenter Exp $
+ * $Id: buffer.h,v 1.9 2001/09/06 15:23:46 joachim_koenig Exp $
*
*
* contents:
@@ -91,6 +91,7 @@ extern "C" {
#define BUF_AUDIO_LPCM_BE 0x03020000
#define BUF_AUDIO_LPCM_LE 0x03030000
#define BUF_AUDIO_AVI 0x03040000
+#define BUF_AUDIO_DTS 0x03050000
/* spu buffer types: */