|
|
|
|
|
|
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
fprintf(stderr, "Unsupported spectral file format.\n"); |
|
|
fprintf(stderr, "Unsupported spectral file format.\n"); |
|
|
|
|
|
fclose(stream); |
|
|
return(1); |
|
|
return(1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fread(&spect->max_y,sizeof(short),1,stream); |
|
|
fread(&spect->max_y,sizeof(short),1,stream); |
|
|
fread(&temp,sizeof(short),1,stream); // unused |
|
|
fread(&temp,sizeof(short),1,stream); // unused |
|
|
|
|
|
|
|
|
if(n==0) return(0); |
|
|
|
|
|
|
|
|
if(n==0) |
|
|
|
|
|
{ |
|
|
|
|
|
fclose(stream); |
|
|
|
|
|
return(0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if(spect->frames != NULL) |
|
|
if(spect->frames != NULL) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
if(spect->frames[ix]->keyframe) |
|
|
if(spect->frames[ix]->keyframe) |
|
|
spect->frames[ix]->length_adjust = spect->frames[ix]->length - GetFrameLength(spect,ix); |
|
|
spect->frames[ix]->length_adjust = spect->frames[ix]->length - GetFrameLength(spect,ix); |
|
|
} |
|
|
} |
|
|
|
|
|
fclose(stream); |
|
|
return(0); |
|
|
return(0); |
|
|
} |
|
|
} |