diff options
author | James Courtier-Dutton <jcdutton@users.sourceforge.net> | 2003-04-11 18:16:48 +0000 |
---|---|---|
committer | James Courtier-Dutton <jcdutton@users.sourceforge.net> | 2003-04-11 18:16:48 +0000 |
commit | ce84ed3d8fa46398f53a1a634416dd924cf22aab (patch) | |
tree | 6a3a549d2236d9facd2c2ff5ac7c78124b2ba247 /src | |
parent | 8c45f2665be77e7d16bd35cc36cf4310db2da00b (diff) | |
download | xine-lib-ce84ed3d8fa46398f53a1a634416dd924cf22aab.tar.gz xine-lib-ce84ed3d8fa46398f53a1a634416dd924cf22aab.tar.bz2 |
Enable A52 .WAV files.
Software A52 decode works, SPDIF passthru does not yet.
To play one has to select audio channel 1 at the moment.
CVS patchset: 4588
CVS date: 2003/04/11 18:16:48
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_wav.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index ee73b7b98..6193a4b77 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -20,7 +20,7 @@ * MS WAV File Demuxer by Mike Melanson (melanson@pcisys.net) * based on WAV specs that are available far and wide * - * $Id: demux_wav.c,v 1.39 2003/03/31 19:31:58 tmmm Exp $ + * $Id: demux_wav.c,v 1.40 2003/04/11 18:16:48 jcdutton Exp $ * */ @@ -196,7 +196,6 @@ static int demux_wav_send_chunk(demux_plugin_t *this_gen) { } buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo); - buf->type = this->audio_type; buf->extra_info->input_pos = current_file_pos; buf->extra_info->input_length = this->data_size; buf->extra_info->input_time = current_pts / 90; @@ -215,9 +214,36 @@ static int demux_wav_send_chunk(demux_plugin_t *this_gen) { break; } +#if 0 + for(n=0;n<20;n++) { + printf("%x ",buf->content[n]); + } + printf("\n"); +#endif + + if (this->audio_type == BUF_AUDIO_LPCM_LE) { + if (buf->content[0] == 0x72 && + buf->content[1] == 0xf8 && + buf->content[2] == 0x1f && + buf->content[3] == 0x4e ) { + this->audio_type = BUF_AUDIO_DNET; + buf->content+=8; + } + } else if (this->audio_type == BUF_AUDIO_DNET) { + buf->content+=8; + buf->pts=0; /* We don't need pts values for only audio streams. */ + } +#if 0 + for(n=0;n<20;n++) { + printf("%x ",buf->content[n]); + } + printf("\n"); +#endif + if (!remaining_sample_bytes) buf->decoder_flags |= BUF_FLAG_FRAME_END; + buf->type = this->audio_type; this->audio_fifo->put (this->audio_fifo, buf); } |