aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine SOULIER <103120622+asoulier@users.noreply.github.com>2023-05-08 09:09:12 -0700
committerGitHub <noreply@github.com>2023-05-08 09:09:12 -0700
commit7210a307fe39a1e003d575b42412bb5240913f8d (patch)
tree7c32ef10b97648eb53d6c1dcc6587bcdf352f48c
parentacbdce637e3bddaf23819e9e87510d03649ddfec (diff)
parentca23b7c7ee1d86d0aaa03034eeffe13590419eb3 (diff)
downloadliblc3-7210a307fe39a1e003d575b42412bb5240913f8d.tar.gz
Merge pull request #26 from xyz1001/main
fix: compile error with msvc 17
-rw-r--r--meson.build7
-rw-r--r--src/tns.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 1e27cf7..ca39e5d 100644
--- a/meson.build
+++ b/meson.build
@@ -18,10 +18,13 @@ project('lc3', 'c',
meson_version: '>= 0.47.0',
default_options: ['b_lto=true'])
-add_project_arguments('-ffast-math', language: 'c')
-
cc = meson.get_compiler('c')
+if cc.get_id() != 'msvc'
+ add_project_arguments('-ffast-math', language: 'c')
+endif
+
+
m_dep = cc.find_library('m', required: false)
subdir('src')
diff --git a/src/tns.c b/src/tns.c
index 0032b4f..28a854f 100644
--- a/src/tns.c
+++ b/src/tns.c
@@ -378,7 +378,7 @@ void lc3_tns_analyze(enum lc3_dt dt, enum lc3_bandwidth bw,
void lc3_tns_synthesize(enum lc3_dt dt, enum lc3_bandwidth bw,
const struct lc3_tns_data *data, float *x)
{
- float rc[2][8] = { };
+ float rc[2][8] = { 0 };
for (int f = 0; f < data->nfilters; f++)
if (data->rc_order[f])