summaryrefslogtreecommitdiffstats
path: root/dec_audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'dec_audio.c')
-rw-r--r--dec_audio.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/dec_audio.c b/dec_audio.c
index bcc6c3577e..c16b07c252 100644
--- a/dec_audio.c
+++ b/dec_audio.c
@@ -412,6 +412,11 @@ case AFM_MSADPCM:
sh_audio->ds->ss_div = MS_ADPCM_SAMPLES_PER_BLOCK;
sh_audio->ds->ss_mul = sh_audio->wf->nBlockAlign;
break;
+case AFM_FOX61ADPCM:
+ sh_audio->audio_out_minsize=FOX61_ADPCM_SAMPLES_PER_BLOCK * 4;
+ sh_audio->ds->ss_div=FOX61_ADPCM_SAMPLES_PER_BLOCK;
+ sh_audio->ds->ss_mul=FOX61_ADPCM_BLOCK_SIZE;
+ break;
case AFM_FOX62ADPCM:
sh_audio->audio_out_minsize=FOX62_ADPCM_SAMPLES_PER_BLOCK * 4;
sh_audio->ds->ss_div=FOX62_ADPCM_SAMPLES_PER_BLOCK;
@@ -693,6 +698,12 @@ case AFM_MSADPCM:
sh_audio->i_bps = sh_audio->wf->nBlockAlign *
(sh_audio->channels*sh_audio->samplerate) / MS_ADPCM_SAMPLES_PER_BLOCK;
break;
+case AFM_FOX61ADPCM:
+ sh_audio->channels=sh_audio->wf->nChannels;
+ sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
+ sh_audio->i_bps=FOX61_ADPCM_BLOCK_SIZE*
+ (sh_audio->channels*sh_audio->samplerate) / FOX61_ADPCM_SAMPLES_PER_BLOCK;
+ break;
case AFM_FOX62ADPCM:
sh_audio->channels=sh_audio->wf->nChannels;
sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
@@ -1122,13 +1133,22 @@ int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen){
sh_audio->wf->nBlockAlign);
break;
}
+ case AFM_FOX61ADPCM:
+ { unsigned char ibuf[FOX61_ADPCM_BLOCK_SIZE]; // bytes / stereo frame
+ if (demux_read_data(sh_audio->ds, ibuf, FOX61_ADPCM_BLOCK_SIZE) !=
+ FOX61_ADPCM_BLOCK_SIZE)
+ break; // EOF
+ len=2*fox61_adpcm_decode_block((unsigned short*)buf,ibuf);
+ break;
+ }
case AFM_FOX62ADPCM:
{ unsigned char ibuf[FOX62_ADPCM_BLOCK_SIZE * 2]; // bytes / stereo frame
if (demux_read_data(sh_audio->ds, ibuf,
FOX62_ADPCM_BLOCK_SIZE * sh_audio->wf->nChannels) !=
FOX62_ADPCM_BLOCK_SIZE * sh_audio->wf->nChannels)
break; // EOF
- len=2*fox62_adpcm_decode_block((unsigned short*)buf,ibuf, sh_audio->wf->nChannels);
+ len = 2 * fox62_adpcm_decode_block(
+ (unsigned short*)buf,ibuf, sh_audio->wf->nChannels);
break;
}
#ifdef USE_LIBAC3