#include "arm_features.h"
#endif
-#ifdef HAVE_ARMV7
+#ifdef HAVE_ARMV6
#define ssat32_to_16(v) \
asm("ssat %0,#16,%1" : "=r" (v) : "r" (v))
#else
int gpos = sb->interp.gauss.pos;
int vl = (spos >> 6) & ~3;
int vr;
- vr = (gauss[vl+0] * gval(0)) >> 15;
- vr += (gauss[vl+1] * gval(1)) >> 15;
- vr += (gauss[vl+2] * gval(2)) >> 15;
- vr += (gauss[vl+3] * gval(3)) >> 15;
- return vr;
+ vr = gauss[vl+0] * gval(0);
+ vr += gauss[vl+1] * gval(1);
+ vr += gauss[vl+2] * gval(2);
+ vr += gauss[vl+3] * gval(3);
+ return vr >> 15;
}
static void decode_block_data(int *dest, const unsigned char *src, int predict_nr, int shift_factor)
spu.cycles_played += ns_to * 768;
spu.decode_pos = (spu.decode_pos + ns_to) & 0x1ff;
+ spu.spuStat = (spu.spuStat & ~0x800) | ((spu.decode_pos << 3) & 0x800);
#if 0
static int ccount; static time_t ctime; ccount++;
if (time(NULL) != ctime)
static void do_samples_finish(int *SSumLR, int ns_to,
int silentch, int decode_pos)
{
- int vol_l = ((int)regAreaGet(H_SPUmvolL) << 17) >> 17;
- int vol_r = ((int)regAreaGet(H_SPUmvolR) << 17) >> 17;
+ int vol_l = ((int)regAreaGet(H_SPUcmvolL) << 16) >> 17;
+ int vol_r = ((int)regAreaGet(H_SPUcmvolR) << 16) >> 17;
int ns;
int d;
FeedXA(xap); // call main XA feeder
spu.xapGlobal = xap; // store info for save states
+ spu.cdClearSamples = 512;
}
// CDDA AUDIO
do_samples(cycle, 1); // catch up to prevent source underflows later
FeedCDDA((unsigned char *)pcm, nbytes);
+ spu.cdClearSamples = 512;
return 0;
}
#endif
+long CALLBACK SPUfreeze(unsigned int ulFreezeMode, struct SPUFreeze * pF,
+ unsigned int cycles)
+{
+ if (worker != NULL)
+ sync_worker_thread(1);
+ return DoFreeze(ulFreezeMode, pF, cycles);
+}
+
// SPUINIT: this func will be called first by the main emu
long CALLBACK SPUinit(void)
{
*run_chans = ~spu.dwChannelsAudible & ~spu.dwChannelDead & irq_chans;
*fmod_chans_out = fmod_chans;
*noise_chans_out = noise_chans;
+ // sometimes unused
+ (void)do_samples_skip_fmod;
+ (void)SkipADSR;
}
// vim:shiftwidth=1:expandtab