Interpolation is a technique by which the sample rate is increased in order to extend the frequency range. Interpolation can be of any order but rely upon a common interpolation/decimation factor. In the case here it is simple because the interpolation is an order of 2 ie: 1:4 so a simple interpolation filter is all that is required!
// Generate 1:4 samples via interpolation bit set MODE1 PEYEN; nop; r4=dm(_audio48k); // data at 48k r0=0; r1=0; // jump =(loops-1)*2 m2=0x1e; m3=2; m10=2; r5=_coeffs_interpolate; i4=_history192k; r8=r0+r1, r12=r0-r1, i12=r5; // Save data in history[30],[31] r9=r0+r1, r13=r0-r1, dm(m2,i4)=r4; r10=r0+r1, r14=r0-r1, r2=dm(m3,i4); r11=r0+r1, r15=r0-r1; // Loop 16 times filter = 64 coefficients lcntr=0x10, do lpr4 until lce; // Calculate the 4 data streams dm(i4,m3)=r2, r4=pm(i12,m10); f12=f2*f4, f8=f8+f12, r4=pm(i12,m10); f13=f2*f4, f9=f9+f13, r4=pm(i12,m10); f14=f2*f4, f10=f10+f14, r4=pm(i12,m10); lpr4: f15=f2*f4, f11=f11+f15, r2=dm(m3,i4); // Last sums to tidy up the loop runover f8=f8+f12; f9=f9+f13; f10=f10+f14; f11=f11+f15; i4=_audio192k; // Save data in blocks of 4 dm(0x6,i4)=r8; dm(0x4,i4)=r9; dm(m3,i4)=r10; dm(m5,i4)=r11; bit clr MODE1 PEYEN; nop;