Skip to content

Commit 59ce2f4

Browse files
committed
ext: add libsamplerate library
Adds libsamplerate library that allows to resample audio streams to different samplerate.
1 parent e55baf9 commit 59ce2f4

File tree

3 files changed

+131
-0
lines changed

3 files changed

+131
-0
lines changed

ext/libsamplerate/include/config.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
#ifndef H_LIBSAMPLERATE_CONFIG_
21+
#define H_LIBSAMPLERATE_CONFIG_
22+
23+
#include "syscfg/syscfg.h"
24+
25+
#if MYNEWT_VAL(ENABLE_SINC_BEST_CONVERTER)
26+
#define ENABLE_SINC_BEST_CONVERTER 1
27+
#endif
28+
29+
#if MYNEWT_VAL(ENABLE_SINC_MEDIUM_CONVERTER)
30+
#define ENABLE_SINC_MEDIUM_CONVERTER 1
31+
#endif
32+
33+
#if MYNEWT_VAL(ENABLE_SINC_FAST_CONVERTER)
34+
#define ENABLE_SINC_FAST_CONVERTER 1
35+
#endif
36+
37+
#if MYNEWT_VAL(LIBSAMPLER_NDEBUG)
38+
#define LIBSAMPLER_NDEBUG 1
39+
#endif
40+
41+
#define PACKAGE "libsamplerate"
42+
#define VERSION "0.2.2"
43+
44+
#endif /* H_LIBSAMPLERATE_CONFIG_ */

ext/libsamplerate/pkg.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
pkg.name: ext/libsamplerate
21+
pkg.description: samplerate library
22+
pkg.author: "Apache Mynewt <[email protected]>"
23+
pkg.homepage: "http://mynewt.apache.org/"
24+
pkg.keywords:
25+
- samplerate
26+
27+
pkg.type: sdk
28+
29+
pkg.cflags: -DHAVE_STDBOOL_H -fsingle-precision-constant -DHAVE_CONFIG_H
30+
pkg.cflags.ENABLE_SINC_BEST_CONVERTER: -DENABLE_SINC_BEST_CONVERTER
31+
pkg.cflags.ENABLE_SINC_MEDIUM_CONVERTER: -DENABLE_SINC_MEDIUM_CONVERTER
32+
pkg.cflags.ENABLE_SINC_FAST_CONVERTER: -DENABLE_SINC_FAST_CONVERTER
33+
pkg.cflags.LIBSAMPLER_NDEBUG: -DNDEBUG
34+
pkg.lflags: -lm
35+
36+
pkg.ign_dirs:
37+
- "@libsamplerate/Octave"
38+
- "@libsamplerate/Win32"
39+
- "@libsamplerate/cmake"
40+
- "@libsamplerate/docs"
41+
- "@libsamplerate/examples"
42+
- "@libsamplerate/include"
43+
- "@libsamplerate/m4"
44+
- "@libsamplerate/tests"
45+
46+
pkg.src_dirs:
47+
- "@libsamplerate/src"
48+
49+
pkg.include_dirs:
50+
- "@libsamplerate/include"
51+
52+
repository.libsamplerate:
53+
type: github
54+
vers: 0.2.2-commit
55+
branch: release-0.2.2
56+
user: libsndfile
57+
repo: libsamplerate

ext/libsamplerate/syscfg.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
syscfg.defs:
19+
ENABLE_SINC_BEST_CONVERTER:
20+
description: Enable SINC best converter
21+
value: 1
22+
ENABLE_SINC_MEDIUM_CONVERTER:
23+
description: Enable SINC medium converter
24+
value: 1
25+
ENABLE_SINC_FAST_CONVERTER:
26+
description: Enable SINC fastest converter
27+
value: 1
28+
LIBSAMPLER_NDEBUG:
29+
description: Define NDEBUG for resampler code (turns off asserts)
30+
value: 0

0 commit comments

Comments
 (0)