diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/audio_out.c | 29 | ||||
-rw-r--r-- | src/xine-engine/audio_out.h | 4 | ||||
-rw-r--r-- | src/xine-engine/metronom.c | 4 |
3 files changed, 14 insertions, 23 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 69c652a79..abaf1b7df 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.35 2001/11/20 12:41:57 miguelfreitas Exp $ + * $Id: audio_out.c,v 1.36 2001/11/27 00:00:35 jcdutton Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -469,6 +469,8 @@ static void *ao_loop (void *this_gen) { ((data[6] & 0xff) << 4) | ((data[7] & 0xf0) >> 4); ac5_length++; + ac5_length=ac5_length * buf->frame_header_count ; + if (ac5_length > 4088) { /* Biggest PCM length from AC5 is 4096 */ break; @@ -491,29 +493,14 @@ static void *ao_loop (void *this_gen) { } else { printf("BAD AC5 length\n"); break; - } + } + if (ac5_pcm_length < (512 * buf->frame_header_count)) { + ac5_pcm_length = 512 * buf->frame_header_count ; + } + /* printf("DTS length=%d\n",ac5_pcm_length); */ this->driver->write(this->driver, this->frame_buffer, ac5_pcm_length); break; - - - - - - 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(buf->mem,this->frame_buffer+4, 2014 ); - - this->driver->write(this->driver, this->frame_buffer, 1024); - - break; - } } diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h index a3f1c65e2..ab219a648 100644 --- a/src/xine-engine/audio_out.h +++ b/src/xine-engine/audio_out.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: audio_out.h,v 1.21 2001/11/20 12:41:58 miguelfreitas Exp $ + * $Id: audio_out.h,v 1.22 2001/11/27 00:00:35 jcdutton Exp $ */ #ifndef HAVE_AUDIO_OUT_H #define HAVE_AUDIO_OUT_H @@ -135,6 +135,8 @@ struct audio_buffer_s { uint32_t vpts; uint32_t scr; + uint32_t frame_header_count; + uint32_t first_access_unit; }; typedef struct ao_instance_s ao_instance_t; diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c index 2924d6a4b..19bd88523 100644 --- a/src/xine-engine/metronom.c +++ b/src/xine-engine/metronom.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: metronom.c,v 1.37 2001/11/18 03:53:25 guenter Exp $ + * $Id: metronom.c,v 1.38 2001/11/27 00:00:35 jcdutton Exp $ */ #ifdef HAVE_CONFIG_H @@ -617,6 +617,8 @@ static uint32_t metronom_got_audio_samples (metronom_t *this, uint32_t pts, uint32_t vpts; #ifdef METRONOM_LOG + printf ("metronom: DTS pts is %u, last_pts is %u, diff = %d\n", + pts, this->last_audio_pts, pts - this->last_audio_pts); printf ("metronom: got %d audio samples (pts=%d)\n", nsamples,pts); #endif |