This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 20fb7e189 nxplayer: enqueue streaming data to audio driver.
20fb7e189 is described below

commit 20fb7e1898d4ce88bcb843328518f12c006c761e
Author: qiaohaijiao1 <qiaohaiji...@xiaomi.com>
AuthorDate: Mon Jan 16 11:37:18 2023 +0800

    nxplayer: enqueue streaming data to audio driver.
    
    audio offload playback, change data form to streaming.
    
    Signed-off-by: qiaohaijiao1 <qiaohaiji...@xiaomi.com>
---
 include/system/nxplayer.h                             | 6 +++---
 system/nxplayer/Makefile                              | 2 +-
 system/nxplayer/nxplayer.c                            | 4 ++--
 system/nxplayer/{nxplayer_pcm.c => nxplayer_common.c} | 8 ++++----
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/system/nxplayer.h b/include/system/nxplayer.h
index ba2c65630..aea4d2d42 100644
--- a/include/system/nxplayer.h
+++ b/include/system/nxplayer.h
@@ -522,9 +522,9 @@ int nxplayer_parse_mp3(int fd, FAR uint32_t *samplerate,
 int nxplayer_fill_mp3(int fd, FAR struct ap_buffer_s *apb);
 
 /****************************************************************************
- * Name: nxplayer_fill_pcm
+ * Name: nxplayer_fill_common
  *
- *   Performs read pcm file to apb buffer
+ *   Performs common function to read data to apb buffer
  *
  * Input Parameters:
  *   pplayer   - Pointer to the context to initialize
@@ -534,7 +534,7 @@ int nxplayer_fill_mp3(int fd, FAR struct ap_buffer_s *apb);
  *
  ****************************************************************************/
 
-int nxplayer_fill_pcm(int fd, FAR struct ap_buffer_s *apb);
+int nxplayer_fill_common(int fd, FAR struct ap_buffer_s *apb);
 
 #undef EXTERN
 #ifdef __cplusplus
diff --git a/system/nxplayer/Makefile b/system/nxplayer/Makefile
index 73241e66f..8741d0f79 100644
--- a/system/nxplayer/Makefile
+++ b/system/nxplayer/Makefile
@@ -23,8 +23,8 @@ include $(APPDIR)/Make.defs
 # NxPlayer Library
 
 CSRCS     = nxplayer.c
+CSRCS    += nxplayer_common.c
 CSRCS    += nxplayer_mp3.c
-CSRCS    += nxplayer_pcm.c
 
 ifneq ($(CONFIG_NXPLAYER_COMMAND_LINE),)
 PROGNAME  = nxplayer
diff --git a/system/nxplayer/nxplayer.c b/system/nxplayer/nxplayer.c
index c8f534e4e..09b0a17d9 100644
--- a/system/nxplayer/nxplayer.c
+++ b/system/nxplayer/nxplayer.c
@@ -131,12 +131,12 @@ static const struct nxplayer_dec_ops_s g_dec_ops[] =
   {
     AUDIO_FMT_MP3,
     nxplayer_parse_mp3,
-    nxplayer_fill_mp3
+    nxplayer_fill_common
   },
   {
     AUDIO_FMT_PCM,
     NULL,
-    nxplayer_fill_pcm
+    nxplayer_fill_common
   }
 };
 
diff --git a/system/nxplayer/nxplayer_pcm.c b/system/nxplayer/nxplayer_common.c
similarity index 94%
rename from system/nxplayer/nxplayer_pcm.c
rename to system/nxplayer/nxplayer_common.c
index 2b40b6959..29960fda0 100644
--- a/system/nxplayer/nxplayer_pcm.c
+++ b/system/nxplayer/nxplayer_common.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * apps/system/nxplayer/nxplayer_pcm.c
+ * apps/system/nxplayer/nxplayer_common.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -38,13 +38,13 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: nxplayer_fill_pcm
+ * Name: nxplayer_fill_common
  *
- *   nxplayer_fill_pcm fill pcm data into apb buffer.
+ *   nxplayer_fill_common fill data into apb buffer.
  *
  ****************************************************************************/
 
-int nxplayer_fill_pcm(int fd, FAR struct ap_buffer_s *apb)
+int nxplayer_fill_common(int fd, FAR struct ap_buffer_s *apb)
 {
   /* Read data into the buffer. */
 

Reply via email to