mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-15 21:40:22 +00:00
hfp test: mode input to data, generated files to results
This commit is contained in:
parent
b81e1fecff
commit
01c540a882
4
test/hfp/.gitignore
vendored
4
test/hfp/.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
hfp_hf_client_test
|
hfp_hf_client_test
|
||||||
hfp_ag_client_test
|
hfp_ag_client_test
|
||||||
hfp_hf_parser_test
|
hfp_hf_parser_test
|
||||||
hfp_ag_parser_test
|
hfp_ag_parser_test
|
||||||
|
cvsd_plc_test
|
||||||
|
results/*
|
||||||
|
@ -61,7 +61,7 @@ EXAMPLES = hfp_ag_parser_test hfp_ag_client_test hfp_hf_parser_test hfp_hf_clien
|
|||||||
all: ${EXAMPLES}
|
all: ${EXAMPLES}
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf *.o $(EXAMPLES) $(CLIENT_EXAMPLES) *.dSYM *.wav
|
rm -rf *.o $(EXAMPLES) $(CLIENT_EXAMPLES) *.dSYM *.wav results/*
|
||||||
|
|
||||||
hfp_ag_parser_test: ${COMMON_OBJ} hfp_gsm_model.o hfp_ag.o hfp.o hfp_ag_parser_test.c
|
hfp_ag_parser_test: ${COMMON_OBJ} hfp_gsm_model.o hfp_ag.o hfp.o hfp_ag_parser_test.c
|
||||||
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
||||||
|
@ -161,31 +161,31 @@ TEST(CVSD_PLC, CountEqBytes){
|
|||||||
|
|
||||||
TEST(CVSD_PLC, TestLiveWavFile){
|
TEST(CVSD_PLC, TestLiveWavFile){
|
||||||
int corruption_step = 10;
|
int corruption_step = 10;
|
||||||
introduce_bad_frames_to_wav_file("data/input/sco_input.wav", "data/sco_input.wav", 0);
|
introduce_bad_frames_to_wav_file("data/input/sco_input.wav", "results/sco_input.wav", 0);
|
||||||
introduce_bad_frames_to_wav_file("data/input/sco_input.wav", "data/sco_input_with_bad_frames.wav", corruption_step);
|
introduce_bad_frames_to_wav_file("data/input/sco_input.wav", "results/sco_input_with_bad_frames.wav", corruption_step);
|
||||||
|
|
||||||
mark_bad_frames_wav_file("data/sco_input.wav", "data/sco_input_detected_frames.wav");
|
mark_bad_frames_wav_file("results/sco_input.wav", "results/sco_input_detected_frames.wav");
|
||||||
process_wav_file_with_plc("data/sco_input.wav", "data/sco_input_after_plc.wav");
|
process_wav_file_with_plc("results/sco_input.wav", "results/sco_input_after_plc.wav");
|
||||||
process_wav_file_with_plc("data/sco_input_with_bad_frames.wav", "data/sco_input_with_bad_frames_after_plc.wav");
|
process_wav_file_with_plc("results/sco_input_with_bad_frames.wav", "results/sco_input_with_bad_frames_after_plc.wav");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(CVSD_PLC, TestFanfareFile){
|
TEST(CVSD_PLC, TestFanfareFile){
|
||||||
int corruption_step = 10;
|
int corruption_step = 10;
|
||||||
introduce_bad_frames_to_wav_file("data/input/fanfare_mono.wav", "data/fanfare_mono.wav", 0);
|
introduce_bad_frames_to_wav_file("data/input/fanfare_mono.wav", "results/fanfare_mono.wav", 0);
|
||||||
introduce_bad_frames_to_wav_file("data/fanfare_mono.wav", "data/fanfare_mono_with_bad_frames.wav", corruption_step);
|
introduce_bad_frames_to_wav_file("results/fanfare_mono.wav", "results/fanfare_mono_with_bad_frames.wav", corruption_step);
|
||||||
|
|
||||||
mark_bad_frames_wav_file("data/fanfare_mono.wav", "data/fanfare_mono_detected_frames.wav");
|
mark_bad_frames_wav_file("results/fanfare_mono.wav", "results/fanfare_mono_detected_frames.wav");
|
||||||
process_wav_file_with_plc("data/fanfare_mono.wav", "data/fanfare_mono_after_plc.wav");
|
process_wav_file_with_plc("results/fanfare_mono.wav", "results/fanfare_mono_after_plc.wav");
|
||||||
process_wav_file_with_plc("data/fanfare_mono_with_bad_frames.wav", "data/fanfare_mono_with_bad_frames_after_plc.wav");
|
process_wav_file_with_plc("results/fanfare_mono_with_bad_frames.wav", "results/fanfare_mono_with_bad_frames_after_plc.wav");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(CVSD_PLC, TestSineWave){
|
TEST(CVSD_PLC, TestSineWave){
|
||||||
int corruption_step = 10;
|
int corruption_step = 10;
|
||||||
create_sine_wav("data/sine_test.wav");
|
create_sine_wav("results/sine_test.wav");
|
||||||
introduce_bad_frames_to_wav_file("data/sine_test.wav", "data/sine_test_with_bad_frames.wav", corruption_step);
|
introduce_bad_frames_to_wav_file("results/sine_test.wav", "results/sine_test_with_bad_frames.wav", corruption_step);
|
||||||
|
|
||||||
process_wav_file_with_plc("data/sine_test.wav", "data/sine_test_after_plc.wav");
|
process_wav_file_with_plc("results/sine_test.wav", "results/sine_test_after_plc.wav");
|
||||||
process_wav_file_with_plc("data/sine_test_with_bad_frames.wav", "data/sine_test_with_bad_frames_after_plc.wav");
|
process_wav_file_with_plc("results/sine_test_with_bad_frames.wav", "results/sine_test_with_bad_frames_after_plc.wav");
|
||||||
}
|
}
|
||||||
|
|
||||||
int main (int argc, const char * argv[]){
|
int main (int argc, const char * argv[]){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user