#include "pv.h"

/*
 * if output time n >= 0, output first I samples in
 * array A of length N, then shift A left by I samples,
 * padding with zeros after last sample
 */
shiftout( A, N, I, n , file)
    float A[] ; int N, I, n; FILE *file ;
{
 int i ;
    if ( n >= 0 )
    /*
	for ( i = 0 ; i < I ; i++ )
	    printf( "%f\n", A[i] ) ;
    */
fwrite( A, sizeof(float), I, file ) ;
    for ( i = 0 ; i < N - I ; i++ )
	A[i] = A[i+I] ;
    for ( i = N - I ; i < N ; i++ )
	A[i] = 0. ;
}
