summaryrefslogtreecommitdiffstats
path: root/dec_audio.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-28 23:46:52 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-28 23:46:52 +0000
commit2995ee0be664d8836f677a9129ad201077a68c77 (patch)
treec846df733dd2885c27fd98885a46d7fea25440af /dec_audio.c
parent475a35a95279be388e3e5946c17ef39f76da8b01 (diff)
downloadmpv-2995ee0be664d8836f677a9129ad201077a68c77.tar.bz2
mpv-2995ee0be664d8836f677a9129ad201077a68c77.tar.xz
g72x is optional (caused problems wiht opendivx)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3867 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_audio.c')
-rw-r--r--dec_audio.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/dec_audio.c b/dec_audio.c
index f740b76378..d772586051 100644
--- a/dec_audio.c
+++ b/dec_audio.c
@@ -1,4 +1,6 @@
+#define USE_G72X
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -30,8 +32,10 @@ extern int verbose; // defined in mplayer.c
static sample_t * a52_samples;
static a52_state_t a52_state;
+#ifdef USE_G72X
#include "g72x/g72x.h"
static G72x_DATA g72x_data;
+#endif
#include "alaw.h"
@@ -295,6 +299,7 @@ case AFM_MPEG:
// MPEG Audio:
sh_audio->audio_out_minsize=4608;
break;
+#ifdef USE_G72X
case AFM_G72X:
// g72x_reader_init(&g72x_data,G723_16_BITS_PER_SAMPLE);
g72x_reader_init(&g72x_data,G723_24_BITS_PER_SAMPLE);
@@ -302,6 +307,7 @@ case AFM_G72X:
// g72x_reader_init(&g72x_data,G721_40_BITS_PER_SAMPLE);
sh_audio->audio_out_minsize=g72x_data.samplesperblock*4;
break;
+#endif
case AFM_FFMPEG:
#ifndef USE_LIBAVCODEC
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_NoLAVCsupport);
@@ -458,6 +464,7 @@ case AFM_ALAW: {
sh_audio->i_bps=sh_audio->channels*sh_audio->samplerate;
break;
}
+#ifdef USE_G72X
case AFM_G72X: {
// GSM 723 audio codec:
sh_audio->channels=sh_audio->wf->nChannels;
@@ -465,6 +472,7 @@ case AFM_G72X: {
sh_audio->i_bps=(sh_audio->samplerate/g72x_data.samplesperblock)*g72x_data.blocksize;
break;
}
+#endif
#ifdef USE_LIBAVCODEC
case AFM_FFMPEG: {
int x;
@@ -920,6 +928,7 @@ int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen){
len=2*320;
break;
}
+#ifdef USE_G72X
case AFM_G72X: // GSM 723 decoder
{ if(demux_read_data(sh_audio->ds,g72x_data.block, g72x_data.blocksize)!=g72x_data.blocksize) break; // EOF
g72x_decode_block(&g72x_data);
@@ -927,6 +936,7 @@ int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen){
memcpy(buf,g72x_data.samples,len);
break;
}
+#endif
case AFM_IMAADPCM:
{ unsigned char ibuf[IMA_ADPCM_BLOCK_SIZE * 2]; // bytes / stereo frame
if (demux_read_data(sh_audio->ds, ibuf,