This is an automated email from the ASF dual-hosted git repository. kopyscinski pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push: new 59ce2f441 ext: add libsamplerate library 59ce2f441 is described below commit 59ce2f441010a5d572fa5ca16fc28240cc2601fb Author: Krzysztof Kopyściński <krzysztof.kopyscin...@codecoup.pl> AuthorDate: Tue Feb 27 10:07:44 2024 +0100 ext: add libsamplerate library Adds libsamplerate library that allows to resample audio streams to different samplerate. --- ext/libsamplerate/include/config.h | 44 +++++++++++++++++++++++++++++ ext/libsamplerate/pkg.yml | 57 ++++++++++++++++++++++++++++++++++++++ ext/libsamplerate/syscfg.yml | 30 ++++++++++++++++++++ 3 files changed, 131 insertions(+) diff --git a/ext/libsamplerate/include/config.h b/ext/libsamplerate/include/config.h new file mode 100644 index 000000000..756c57d18 --- /dev/null +++ b/ext/libsamplerate/include/config.h @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#ifndef H_LIBSAMPLERATE_CONFIG_ +#define H_LIBSAMPLERATE_CONFIG_ + +#include "syscfg/syscfg.h" + +#if MYNEWT_VAL(ENABLE_SINC_BEST_CONVERTER) +#define ENABLE_SINC_BEST_CONVERTER 1 +#endif + +#if MYNEWT_VAL(ENABLE_SINC_MEDIUM_CONVERTER) +#define ENABLE_SINC_MEDIUM_CONVERTER 1 +#endif + +#if MYNEWT_VAL(ENABLE_SINC_FAST_CONVERTER) +#define ENABLE_SINC_FAST_CONVERTER 1 +#endif + +#if MYNEWT_VAL(LIBSAMPLER_NDEBUG) +#define LIBSAMPLER_NDEBUG 1 +#endif + +#define PACKAGE "libsamplerate" +#define VERSION "0.2.2" + +#endif /* H_LIBSAMPLERATE_CONFIG_ */ diff --git a/ext/libsamplerate/pkg.yml b/ext/libsamplerate/pkg.yml new file mode 100644 index 000000000..a42d0ea6c --- /dev/null +++ b/ext/libsamplerate/pkg.yml @@ -0,0 +1,57 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +pkg.name: ext/libsamplerate +pkg.description: samplerate library +pkg.author: "Apache Mynewt <d...@mynewt.apache.org>" +pkg.homepage: "http://mynewt.apache.org/" +pkg.keywords: + - samplerate + +pkg.type: sdk + +pkg.cflags: -DHAVE_STDBOOL_H -fsingle-precision-constant -DHAVE_CONFIG_H +pkg.cflags.ENABLE_SINC_BEST_CONVERTER: -DENABLE_SINC_BEST_CONVERTER +pkg.cflags.ENABLE_SINC_MEDIUM_CONVERTER: -DENABLE_SINC_MEDIUM_CONVERTER +pkg.cflags.ENABLE_SINC_FAST_CONVERTER: -DENABLE_SINC_FAST_CONVERTER +pkg.cflags.LIBSAMPLER_NDEBUG: -DNDEBUG +pkg.lflags: -lm + +pkg.ign_dirs: + - "@libsamplerate/Octave" + - "@libsamplerate/Win32" + - "@libsamplerate/cmake" + - "@libsamplerate/docs" + - "@libsamplerate/examples" + - "@libsamplerate/include" + - "@libsamplerate/m4" + - "@libsamplerate/tests" + +pkg.src_dirs: + - "@libsamplerate/src" + +pkg.include_dirs: + - "@libsamplerate/include" + +repository.libsamplerate: + type: github + vers: 0.2.2-commit + branch: release-0.2.2 + user: libsndfile + repo: libsamplerate diff --git a/ext/libsamplerate/syscfg.yml b/ext/libsamplerate/syscfg.yml new file mode 100644 index 000000000..11232a69b --- /dev/null +++ b/ext/libsamplerate/syscfg.yml @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +syscfg.defs: + ENABLE_SINC_BEST_CONVERTER: + description: Enable SINC best converter + value: 1 + ENABLE_SINC_MEDIUM_CONVERTER: + description: Enable SINC medium converter + value: 1 + ENABLE_SINC_FAST_CONVERTER: + description: Enable SINC fastest converter + value: 1 + LIBSAMPLER_NDEBUG: + description: Define NDEBUG for resampler code (turns off asserts) + value: 0