Skip to content

Commit 51b9639

Browse files
authored
fix: remove an expired testing code
1 parent bf79329 commit 51b9639

1 file changed

Lines changed: 3 additions & 29 deletions

File tree

Extensions/SoundFlow.Extensions.WebRtc.Apm/Native/webrtc/api/audio/audio_processing.h

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,26 +1084,6 @@ RTC_EXPORT size_t webrtc_apm_get_frame_size(int sample_rate_hz);
10841084
} // extern "C"
10851085
#endif
10861086

1087-
1088-
static auto is_beta_available() -> bool {
1089-
// Get current time in seconds since epoch
1090-
const auto now = std::chrono::system_clock::now();
1091-
const std::time_t now_t = std::chrono::system_clock::to_time_t(now);
1092-
1093-
// Define the cutoff date as a tm struct
1094-
std::tm cutoff_tm{};
1095-
cutoff_tm.tm_year = 2025 - 1900; // Years since 1900
1096-
cutoff_tm.tm_mon = 5 - 1; // Months since January (0-indexed)
1097-
cutoff_tm.tm_mday = 20;
1098-
1099-
// Convert cutoff date to time_t
1100-
const std::time_t cutoff_t = std::mktime(&cutoff_tm);
1101-
1102-
// Compare the time_t values
1103-
return now_t < cutoff_t;
1104-
}
1105-
1106-
11071087
// Implementation
11081088
struct webrtc_apm {
11091089
rtc::scoped_refptr<webrtc::AudioProcessing> apm;
@@ -1123,9 +1103,6 @@ struct webrtc_processing_config {
11231103

11241104
// Creation and destruction
11251105
inline webrtc_apm* webrtc_apm_create() {
1126-
if (!is_beta_available())
1127-
return nullptr;
1128-
11291106
webrtc_apm* apm = new webrtc_apm();
11301107
apm->apm = webrtc::AudioProcessingBuilder().Create();
11311108
return apm;
@@ -1137,9 +1114,6 @@ inline void webrtc_apm_destroy(webrtc_apm* apm) {
11371114

11381115
// Configuration management
11391116
inline webrtc_apm_config* webrtc_apm_config_create() {
1140-
if (!is_beta_available())
1141-
return nullptr;
1142-
11431117
return new webrtc_apm_config();
11441118
}
11451119

@@ -1304,7 +1278,7 @@ inline webrtc_apm_error webrtc_apm_process_stream(webrtc_apm* apm, const float*
13041278
const webrtc_stream_config* input_config,
13051279
const webrtc_stream_config* output_config,
13061280
float* const* dest) {
1307-
if (!apm || !input_config || !output_config || !is_beta_available()) {
1281+
if (!apm || !input_config || !output_config) {
13081282
return WEBRTC_APM_BAD_PARAMETER;
13091283
}
13101284
return static_cast<webrtc_apm_error>(
@@ -1315,7 +1289,7 @@ inline webrtc_apm_error webrtc_apm_process_reverse_stream(webrtc_apm* apm, const
13151289
const webrtc_stream_config* input_config,
13161290
const webrtc_stream_config* output_config,
13171291
float* const* dest) {
1318-
if (!apm || !input_config || !output_config || !is_beta_available()) {
1292+
if (!apm || !input_config || !output_config) {
13191293
return WEBRTC_APM_BAD_PARAMETER;
13201294
}
13211295
return static_cast<webrtc_apm_error>(
@@ -1324,7 +1298,7 @@ inline webrtc_apm_error webrtc_apm_process_reverse_stream(webrtc_apm* apm, const
13241298

13251299
inline webrtc_apm_error webrtc_apm_analyze_reverse_stream(webrtc_apm* apm, const float* const* data,
13261300
const webrtc_stream_config* reverse_config) {
1327-
if (!apm || !reverse_config || !is_beta_available()) {
1301+
if (!apm || !reverse_config) {
13281302
return WEBRTC_APM_BAD_PARAMETER;
13291303
}
13301304
return static_cast<webrtc_apm_error>(

0 commit comments

Comments
 (0)