1003
936
// ----------------------------------------------------------------------------
1004
937
// SID clocking with audio sampling - cycle based with audio resampling.
1005
938
// ----------------------------------------------------------------------------
1007
939
int SID::clock_resample_fastmem(cycle_count& delta_t, short* buf, int n,
1013
945
cycle_count next_sample_offset = sample_offset + cycles_per_sample;
1014
946
cycle_count delta_t_sample = next_sample_offset >> FIXP_SHIFT;
1021
952
for (int i = 0; i < delta_t_sample; i++) {
1023
954
sample[sample_index] = sample[sample_index + RINGSIZE] = output();
1024
955
++sample_index &= RINGMASK;
1027
963
sample_offset = next_sample_offset & FIXP_MASK;
1029
965
int fir_offset = sample_offset*fir_RES >> FIXP_SHIFT;