# HG changeset patch # User arpi # Date 1009583212 0 # Node ID 50d7eec1d4b9bb5dd1e0063f3e10de4747fc64e7 # Parent a0c8079d271183d7fd109b016a1ea7d992b5489a g72x is optional (caused problems wiht opendivx) diff -r a0c8079d2711 -r 50d7eec1d4b9 dec_audio.c --- a/dec_audio.c Fri Dec 28 23:44:12 2001 +0000 +++ b/dec_audio.c Fri Dec 28 23:46:52 2001 +0000 @@ -1,3 +1,5 @@ + +#define USE_G72X #include #include @@ -30,8 +32,10 @@ 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 @@ // 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 @@ // 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 @@ 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 @@ 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 @@ 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 @@ 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,