#define CACHA_NSAMPLESTOSEND 10 // a sample is positionned at a high pred from the cnn, we extract the audio signal arround to send back via network
#define CACHA_SAMPLESPERSAMPLE 6400 // number of audio samples per high pred sample to send back
#define CACHA_RAPPORT_NSAMPLESTOSEND 10 // a sample is positionned at a high pred from the cnn, we extract the audio signal arround to send back via network
#define CACHA_RAPPORT_SAMPLE_RATE 128000
#define CACHA_RAPPORT_SAMPLESPERSAMPLE 12800// number of audio samples per high pred sample to send back
#define RAPPORT_CHANNELS 5 // number of channels recorded to include in the report
typedefstruct{
floatpredsC[CACHA_LENPRED];//len of preds for 10sec signal
...
...
@@ -33,10 +36,10 @@ typedef struct{
charfileName[50];//Nom du fichier concerne
intToAs_cacha[NTOAS_MAX];
unsignedcharhydros_ToAs_cacha[NTOAS_MAX];
shortpredPeaksR[RORQUAL_NSAMPLESTOSEND];//indices of predPeaks for rorqual
shortpredPeaksC[CACHA_NSAMPLESTOSEND];//indices of predPeaks for cachalot
shortintsamplesR[RORQUAL_NSAMPLESTOSEND][RORQUAL_SAMPLESPERSAMPLE];// samples to send back for rorqual
shortintsamplesC[CACHA_NSAMPLESTOSEND][CACHA_SAMPLESPERSAMPLE];// samples to send back for cachalot
shortpredPeaksR[RORQUAL_RAPPORT_NSAMPLESTOSEND];//indices of predPeaks for rorqual
shortpredPeaksC[CACHA_RAPPORT_NSAMPLESTOSEND];//indices of predPeaks for cachalot
shortintsamplesR[RORQUAL_RAPPORT_NSAMPLESTOSEND][RORQUAL_RAPPORT_SAMPLESPERSAMPLE][RAPPORT_CHANNELS];// samples to send back for rorqual
shortintsamplesC[CACHA_RAPPORT_NSAMPLESTOSEND][CACHA_RAPPORT_SAMPLESPERSAMPLE][RAPPORT_CHANNELS];// samples to send back for cachalot
}RAPPORT;
intmain(intargc,char*argv[]){
...
...
@@ -52,10 +55,10 @@ int main(int argc, char* argv[]){
printf("Failed to open output file\n");
return0;
}
RAPPORTrapport;
staticRAPPORTrapport;
fread(&rapport,sizeof(RAPPORT),1,infile);
printf("Writing into %s with %d fin whale pulses and %d sperm whale clicks \n",argv[1],rapport.numDetectionsRorqual,rapport.numDetectionsCachalot);