X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fpsp%2Fmp3.c;h=4ea3bdd7f6c5e5543420ff7cdeeab5ca935ec728;hb=93f9619ed819dee07948416c98ca2f1c70a22666;hp=c1e608939e22ba7e8e1eb5817114429c693705ed;hpb=efcba75f8a730340df6c1b679a207723f98d1ee6;p=picodrive.git diff --git a/platform/psp/mp3.c b/platform/psp/mp3.c index c1e6089..4ea3bdd 100644 --- a/platform/psp/mp3.c +++ b/platform/psp/mp3.c @@ -1,7 +1,10 @@ -// (c) Copyright 2007 notaz, All rights reserved. -// Free for non-commercial use. - -// For commercial use, separate licencing terms must be obtained. +/* + * PicoDrive + * (C) notaz, 2007,2008 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #include #include @@ -300,11 +303,11 @@ static int decode_thread(SceSize args, void *argp) // might be called before initialization -int mp3_get_bitrate(FILE *f, int size) +int mp3_get_bitrate(void *f, int size) { int ret, retval = -1, sample_rate, bitrate; // filenames are stored instead handles in PSP, due to stupid max open file limit - char *fname = (char *)f; + char *fname = f; /* make sure thread is not busy.. */ if (thread_busy_sem >= 0) @@ -351,9 +354,9 @@ end: static int mp3_job_started = 0, mp3_samples_ready = 0, mp3_buffer_offs = 0, mp3_play_bufsel = 0; -void mp3_start_play(FILE *f, int pos) +void mp3_start_play(void *f, int pos) { - char *fname = (char *)f; + char *fname = f; if (!initialized) return; @@ -463,7 +466,7 @@ int mp3_get_offset(void) // 0-1023 unsigned int offs1024 = 0; int cdda_on; - cdda_on = (PicoAHW & PAHW_MCD) && (PicoOpt&0x800) && !(Pico_mcd->s68k_regs[0x36] & 1) && + cdda_on = (PicoIn.AHW & PAHW_MCD) && (PicoIn.opt&0x800) && !(Pico_mcd->s68k_regs[0x36] & 1) && (Pico_mcd->scd.Status_CDC & 1) && mp3_handle >= 0; if (cdda_on) {