You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/11/17 11:17:22 UTC

[GitHub] [incubator-nuttx] jerpelea opened a new pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

jerpelea opened a new pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324


   ## Summary
   Add audio sample rate conversion library from
   http://www.mega-nerd.com/SRC/index.html
   
   Source:
   https://github.com/libsndfile/libsamplerate
   
   Add needed patches for NuttX OS and embedded boards.
   
   NOTE:
   We must use master branch until next stable release
   
   ## Impact
   Sony spresense board
   
   ## Testing
   Tested on speresense board
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525095651



##########
File path: audio/Makefile
##########
@@ -75,7 +77,7 @@ $(BIN): $(OBJS)
 
 depend: .depend
 
-clean:
+clean: .clean

Review comment:
       I think it's better to extend the target with a double colon.
   The top-level audio/Makefile can have the common target and other Make.defs extend `clean::` with their specific operations.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525094998



##########
File path: audio/Makefile
##########
@@ -49,6 +49,8 @@ ifeq ($(CONFIG_AUDIO_FORMAT_PCM),y)
   CSRCS += pcm_decode.c
 endif
 
+include libsrc/Make.defs

Review comment:
       Isn't that the other way around? 
   i.e. libsrc/Make.defs should include audio/Makefile.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r526923205



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,53 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+PACKAGE=libsamplerate
+VERSION=0.1.9
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend:: libsamplerate
+
+CSRCS += samplerate.c
+CSRCS += src_sinc.c
+CSRCS += src_linear.c
+CSRCS += src_zoh.c
+
+CFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\"
+
+VPATH += libsamplerate/src
+SUBDIRS += libsamplerate/src
+DEPPATH += --dep-path libsamplerate/src
+
+clean::

Review comment:
       change to distclean

##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,53 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+PACKAGE=libsamplerate
+VERSION=0.1.9
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch

Review comment:
       change 0002 to 0001

##########
File path: libs/libc/audio/libsrc/0002-add-audio-quality-options.patch
##########
@@ -0,0 +1,82 @@
+From 8d709a69b23efc52030824ae21db889589467d8c Mon Sep 17 00:00:00 2001
+From: Alin Jerpelea <al...@sony.com>
+Date: Mon, 16 Nov 2020 09:44:17 +0100
+Subject: [PATCH] add audio quality options

Review comment:
       should we upstream this path to mainline too?

##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,53 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+PACKAGE=libsamplerate
+VERSION=0.1.9
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend:: libsamplerate

Review comment:
       change to context




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
jerpelea commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525919257



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend: libsamplerate

Review comment:
       from my understanding should work with : instead of ::




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#issuecomment-730322969


   @jerpelea there are many comments without answer yet.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
jerpelea commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r526939722



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,53 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+PACKAGE=libsamplerate
+VERSION=0.1.9
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend:: libsamplerate

Review comment:
       make[1]: *** No rule to make target 'samplerate.c', needed by '.depend'.  Stop.
   when it is changed to context




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#issuecomment-728907009


   @jerpelea libsamplerate could be used in userspace application too, so why not put into apps/ or libs/ folder?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
jerpelea commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r526811872



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip

Review comment:
       the link contains an older version which can not be used. we will move to the next stable version as soon as it will be released




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
jerpelea commented on pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#issuecomment-730199415


   @xiaoxiang781216 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r527001101



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,53 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+PACKAGE=libsamplerate
+VERSION=0.1.9
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend:: libsamplerate

Review comment:
       Please remove CONFIG_LIB_ZONEINFO_ROMFS here:
   https://github.com/apache/incubator-nuttx/blob/master/tools/Directories.mk#L115-L117




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
jerpelea commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r526944964



##########
File path: libs/libc/audio/libsrc/0002-add-audio-quality-options.patch
##########
@@ -0,0 +1,82 @@
+From 8d709a69b23efc52030824ae21db889589467d8c Mon Sep 17 00:00:00 2001
+From: Alin Jerpelea <al...@sony.com>
+Date: Mon, 16 Nov 2020 09:44:17 +0100
+Subject: [PATCH] add audio quality options

Review comment:
       I will send the patch 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
jerpelea commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525938688



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend: libsamplerate

Review comment:
       @xiaoxiang781216 thanks for the explanation.
   I updated the patch with the :: and tested the functionality
   for the moment I would like to keep depend and later we can migrate to context since it will need several changes




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525937558



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend: libsamplerate

Review comment:
       +1 for context.
   In the same note, the clean should happen in "clean_context" and "distclean" not in "clean".
   However, libc isn't part of the clean_context directories.  To include it we need to add libc in `CCLEANDIRS` in Directories.mk, use a double colon target in libc/Makefile for clean_context and extend it in libc/audio/Make.defs.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r526807711



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend: libsamplerate

Review comment:
       But I don't see there are any tough reason to not do the right thing initially.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525914316



##########
File path: libs/libc/audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
##########
@@ -0,0 +1,34 @@
+From 23d050a04e00d7029a619d235eda137dd3455ab2 Mon Sep 17 00:00:00 2001
+From: Alin Jerpelea <al...@sony.com>
+Date: Mon, 16 Nov 2020 09:43:35 +0100
+Subject: [PATCH 1/2] samplerate: define package and version for NuttX OS
+
+We have to define the PACKAGE and VERSION for NuttX OS.
+
+Signed-off-by: Alin Jerpelea <al...@sony.com>
+---
+ src/samplerate.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/samplerate.h b/src/samplerate.h
+index a3d5ae1..c1cfd6d 100644
+--- a/src/samplerate.h
++++ b/src/samplerate.h
+@@ -18,6 +18,15 @@
+ extern "C" {
+ #endif	/* __cplusplus */
+ 
++/* Name of package */
++#ifndef PACKAGE
++#define PACKAGE "libsamplerate"
++#endif
++
++/* Version number of package */
++#ifndef VERSION
++#define VERSION "0.1.9"
++#endif
+ 
+ /* Opaque data type SRC_STATE. */
+ typedef struct SRC_STATE_tag SRC_STATE ;

Review comment:
       why need this?

##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip

Review comment:
       should we use this download link instead?
   https://github.com/libsndfile/libsamplerate/releases/download/v0.1.9/libsamplerate-0.1.9.tar.gz

##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend: libsamplerate

Review comment:
       depend::?

##########
File path: libs/libc/includenuttxaudio
##########
@@ -0,0 +1,198 @@
+/*
+** Copyright (c) 2002-2016, Erik de Castro Lopo <er...@mega-nerd.com>

Review comment:
       why need this file?

##########
File path: libs/libc/audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
##########
@@ -0,0 +1,34 @@
+From 23d050a04e00d7029a619d235eda137dd3455ab2 Mon Sep 17 00:00:00 2001
+From: Alin Jerpelea <al...@sony.com>
+Date: Mon, 16 Nov 2020 09:43:35 +0100
+Subject: [PATCH 1/2] samplerate: define package and version for NuttX OS
+
+We have to define the PACKAGE and VERSION for NuttX OS.
+
+Signed-off-by: Alin Jerpelea <al...@sony.com>
+---
+ src/samplerate.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/samplerate.h b/src/samplerate.h
+index a3d5ae1..c1cfd6d 100644
+--- a/src/samplerate.h
++++ b/src/samplerate.h
+@@ -18,6 +18,15 @@
+ extern "C" {
+ #endif	/* __cplusplus */
+ 
++/* Name of package */
++#ifndef PACKAGE
++#define PACKAGE "libsamplerate"

Review comment:
       we can pass PACKAGE and VERSION through -D




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525937558



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend: libsamplerate

Review comment:
       +1 for context.
   In the same note, the clean should happen in "clean_context" and "distclean" not in "clean".
   However, libc isn't part of the clean_context directories.  To include it we need to add libc in Directories.mk, use a double colon target in libc/Makefile for clean_context and extend it in libc/audio/Make.defs.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
jerpelea commented on pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#issuecomment-729524065


   @xiaoxiang781216 moved to libc/audio


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
jerpelea commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525918901



##########
File path: libs/libc/audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
##########
@@ -0,0 +1,34 @@
+From 23d050a04e00d7029a619d235eda137dd3455ab2 Mon Sep 17 00:00:00 2001
+From: Alin Jerpelea <al...@sony.com>
+Date: Mon, 16 Nov 2020 09:43:35 +0100
+Subject: [PATCH 1/2] samplerate: define package and version for NuttX OS
+
+We have to define the PACKAGE and VERSION for NuttX OS.
+
+Signed-off-by: Alin Jerpelea <al...@sony.com>
+---
+ src/samplerate.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/samplerate.h b/src/samplerate.h
+index a3d5ae1..c1cfd6d 100644
+--- a/src/samplerate.h
++++ b/src/samplerate.h
+@@ -18,6 +18,15 @@
+ extern "C" {
+ #endif	/* __cplusplus */
+ 
++/* Name of package */
++#ifndef PACKAGE
++#define PACKAGE "libsamplerate"
++#endif
++
++/* Version number of package */
++#ifndef VERSION
++#define VERSION "0.1.9"
++#endif
+ 
+ /* Opaque data type SRC_STATE. */
+ typedef struct SRC_STATE_tag SRC_STATE ;

Review comment:
       removed




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#issuecomment-729064802


   or libc/audio?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525926531



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend: libsamplerate

Review comment:
       No, if you want depend appear more than once(in libc/Makefile and audio/libsrc/Make.defs), you must use :: in both location which mean that clean, depend and context need change to :: in both makefile.
   BTW, we should use context here instead of depend.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525926531



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend: libsamplerate

Review comment:
       No, if you want to depend appear more than once(in libc/Makefile and audio/libsrc/Make.defs), you must use :: in both location which mean that clean, depend and context need change to :: in both makefile.
   BTW, we should use context here instead of depend.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525094998



##########
File path: audio/Makefile
##########
@@ -49,6 +49,8 @@ ifeq ($(CONFIG_AUDIO_FORMAT_PCM),y)
   CSRCS += pcm_decode.c
 endif
 
+include libsrc/Make.defs

Review comment:
       Isn't that the other way around? 
   i.e. libsrc/Make.defs should include audio/Makefile.

##########
File path: audio/Makefile
##########
@@ -75,7 +77,7 @@ $(BIN): $(OBJS)
 
 depend: .depend
 
-clean:
+clean: .clean

Review comment:
       I think it's better to extend the target with a double colon.
   The top-level audio/Makefile can have the common target and other Make.defs include audio/Makefile and extend `clean::` with their specific operations.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on a change in pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
jerpelea commented on a change in pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#discussion_r525938688



##########
File path: libs/libc/audio/libsrc/Make.defs
##########
@@ -0,0 +1,49 @@
+############################################################################
+# audio/libsrc/Make.defs
+#
+# 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.
+#
+############################################################################
+
+ifeq ($(CONFIG_AUDIO_SRC),y)
+
+libsamplerate:
+	$(Q) wget https://codeload.github.com/libsndfile/libsamplerate/zip/master -O libsamplerate.zip
+	$(Q) unzip -o libsamplerate.zip
+	$(Q) mv libsamplerate-master libsamplerate
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0001-samplerate-define-package-and-version-for-NuttX-OS.patch
+	$(Q) patch -Np1 --verbose -d libsamplerate <audio/libsrc/0002-add-audio-quality-options.patch
+	$(Q) cp -rf libsamplerate/src/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
+
+depend: libsamplerate

Review comment:
       @xiaoxiang781216 thanks for the explanation.
   I updated the patch with the :: and tested the functionality




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on pull request #2324: audio: libsamplerate: add initial audio Sample Rate Converter

Posted by GitBox <gi...@apache.org>.
jerpelea commented on pull request #2324:
URL: https://github.com/apache/incubator-nuttx/pull/2324#issuecomment-728929148


   @xiaoxiang781216 I can move it to libs if needed 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org