cfdlp.c
// read in VAD info from a previously read in VAD file.
read in VAD info from a previously read in VAD file.
read in VAD info from a previously read in VAD file .
int *read_VAD(int N, int Fs, int* Nindices)
{
    int flen = DEFAULT_SHORTTERM_WINLEN_MS * Fs;
    int fhop = DEFAULT_SHORTTERM_WINSHIFT_MS * Fs;
    int fnum = floor((N-flen)/fhop)+1;
    int *indices = MALLOC(sizeof(int) * fnum);
    *Nindices = 0;
    if (vad_label_start + fnum > num_vad_labels) {
	fatal("Not enough VAD labels left?!");
    }
    for (int i = 0; i < fnum; i++) {
	if (vad_labels[vad_label_start + i] == 0) {
	    indices[(*Nindices)++] = i;
	}
    }
    return indices;
}
int * read_VAD ( int N , int Fs , int * Nindices ) { int flen = DEFAULT_SHORTTERM_WINLEN_MS * Fs ; int fhop = DEFAULT_SHORTTERM_WINSHIFT_MS * Fs ; int fnum = floor ( ( N - flen ) / fhop ) + 1 ; int * indices = MALLOC ( sizeof ( int ) * fnum ) ; * Nindices = 0 ; if ( vad_label_start + fnum > num_vad_labels ) { fatal ( " " ) ; } for ( int i = 0 ; i < fnum ; i ++ ) { if ( vad_labels [ vad_label_start + i ] == 0 ) { indices [ ( * Nindices ) ++ ] = i ; } } return indices ; }
read in VAD info from a previously read in VAD file.
read in VAD info from a previously read in VAD file .