diff options
Diffstat (limited to 'apps/codecs/Tremor/vorbisfile.c')
-rw-r--r-- | apps/codecs/Tremor/vorbisfile.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/apps/codecs/Tremor/vorbisfile.c b/apps/codecs/Tremor/vorbisfile.c index 92f42a313b..70c0cdb24e 100644 --- a/apps/codecs/Tremor/vorbisfile.c +++ b/apps/codecs/Tremor/vorbisfile.c | |||
@@ -762,6 +762,12 @@ int ov_clear(OggVorbis_File *vf){ | |||
762 | 762 | ||
763 | int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes, | 763 | int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes, |
764 | ov_callbacks callbacks){ | 764 | ov_callbacks callbacks){ |
765 | #if defined(CPU_COLDFIRE) && !defined(SIMULATOR) | ||
766 | /* this seems to be the closest we get to an init function, let's init emac | ||
767 | here. rounding is disabled because of MULT31_SHIFT15, which will be | ||
768 | inaccurate with rounding in its current incarnation */ | ||
769 | coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE); | ||
770 | #endif | ||
765 | int ret=_ov_open1(f,vf,initial,ibytes,callbacks); | 771 | int ret=_ov_open1(f,vf,initial,ibytes,callbacks); |
766 | if(ret)return ret; | 772 | if(ret)return ret; |
767 | return _ov_open2(vf); | 773 | return _ov_open2(vf); |
@@ -1287,15 +1293,12 @@ int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos){ | |||
1287 | int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){ | 1293 | int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){ |
1288 | ogg_packet op={0,0,0,0,0,0}; | 1294 | ogg_packet op={0,0,0,0,0,0}; |
1289 | ogg_page og={0,0,0,0}; | 1295 | ogg_page og={0,0,0,0}; |
1296 | |||
1290 | int thisblock,lastblock=0; | 1297 | int thisblock,lastblock=0; |
1291 | int ret=ov_pcm_seek_page(vf,pos); | 1298 | int ret=ov_pcm_seek_page(vf,pos); |
1292 | if(ret<0)return(ret); | 1299 | if(ret<0)return(ret); |
1293 | _make_decode_ready(vf); | 1300 | _make_decode_ready(vf); |
1294 | 1301 | ||
1295 | #if defined(CPU_COLDFIRE) && !defined(SIMULATOR) | ||
1296 | mcf5249_init_mac(); | ||
1297 | #endif | ||
1298 | |||
1299 | /* discard leading packets we don't need for the lapping of the | 1302 | /* discard leading packets we don't need for the lapping of the |
1300 | position we want; don't decode them */ | 1303 | position we want; don't decode them */ |
1301 | 1304 | ||
@@ -1553,10 +1556,6 @@ long ov_read(OggVorbis_File *vf,char *buffer,int bytes_req,int *bitstream){ | |||
1553 | 1556 | ||
1554 | if(vf->ready_state<OPENED)return(OV_EINVAL); | 1557 | if(vf->ready_state<OPENED)return(OV_EINVAL); |
1555 | 1558 | ||
1556 | #if defined(CPU_COLDFIRE) && !defined(SIMULATOR) | ||
1557 | mcf5249_init_mac(); | ||
1558 | #endif | ||
1559 | |||
1560 | while(1){ | 1559 | while(1){ |
1561 | if(vf->ready_state==INITSET){ | 1560 | if(vf->ready_state==INITSET){ |
1562 | samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); | 1561 | samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); |
@@ -1622,10 +1621,6 @@ long ov_read_fixed(OggVorbis_File *vf,ogg_int32_t ***pcm_channels,int length, | |||
1622 | int *bitstream){ | 1621 | int *bitstream){ |
1623 | if(vf->ready_state<OPENED)return(OV_EINVAL); | 1622 | if(vf->ready_state<OPENED)return(OV_EINVAL); |
1624 | 1623 | ||
1625 | #if CONFIG_CPU == MCF5249 | ||
1626 | mcf5249_init_mac(); | ||
1627 | #endif | ||
1628 | |||
1629 | while(1){ | 1624 | while(1){ |
1630 | if(vf->ready_state==INITSET){ | 1625 | if(vf->ready_state==INITSET){ |
1631 | ogg_int32_t **pcm; | 1626 | ogg_int32_t **pcm; |