samer@34: function [y,phi]=block(o,phi,f) samer@42: % block_sr - generate block of sine wave samples with signal rate control samer@42: % samer@42: % sine/block :: samer@42: % sine ~'sine generator object', samer@42: % real ~'phase at start of block', samer@42: % [[1,N]] ~'frequency at signal rate', samer@42: % -> [[1,N]] ~'block of output samples', samer@42: % real ~'phase at end of block'. samer@42: samer@34: samer@34: u=cumsum([phi,f],2); samer@34: y=sin(2*pi*u(1:end-1)); samer@34: phi=mod(u(end),1); samer@34: