diff --git a/modules/audio_processing/test/audio_processing_simulator.h b/modules/audio_processing/test/audio_processing_simulator.h index c557b7fc96..98a2843c67 100644 --- a/modules/audio_processing/test/audio_processing_simulator.h +++ b/modules/audio_processing/test/audio_processing_simulator.h @@ -41,7 +41,7 @@ struct SimulationSettings { rtc::Optional reverse_output_sample_rate_hz; rtc::Optional reverse_output_num_channels; rtc::Optional microphone_positions; - int target_angle_degrees = 90; + float target_angle_degrees = 90.f; rtc::Optional output_filename; rtc::Optional reverse_output_filename; rtc::Optional input_filename; diff --git a/modules/audio_processing/test/audioproc_float_impl.cc b/modules/audio_processing/test/audioproc_float_impl.cc index de6fb6551f..a698db3959 100644 --- a/modules/audio_processing/test/audioproc_float_impl.cc +++ b/modules/audio_processing/test/audioproc_float_impl.cc @@ -61,10 +61,10 @@ DEFINE_string(mic_positions, "Space delimited cartesian coordinates of microphones in " "meters. The coordinates of each point are contiguous. For a " "two element array: \"x1 y1 z1 x2 y2 z2\""); -DEFINE_int(target_angle_degrees, - 90, - "The azimuth of the target in degrees (0-359). Only applies to " - "beamforming."); +DEFINE_float(target_angle_degrees, + 90.f, + "The azimuth of the target in degrees (0-360). Only applies to " + "beamforming."); DEFINE_bool(fixed_interface, false, "Use the fixed interface when operating on wav files"); @@ -357,8 +357,9 @@ void PerformBasicParameterSanityChecks(const SimulationSettings& settings) { "activated.\n"); ReportConditionalErrorAndExit( - settings.target_angle_degrees < 0 || settings.target_angle_degrees > 359, - "Error: -target_angle_degrees must be specified between 0 and 359.\n"); + settings.target_angle_degrees < 0.f || + settings.target_angle_degrees >= 360.f, + "Error: -target_angle_degrees must be specified between 0 and 360.\n"); ReportConditionalErrorAndExit( settings.aec_suppression_level &&