summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-27 11:05:25 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-27 11:05:25 -0600
commit39845bd9d8d1c85bccbdc13865bd3533d7d25262 (patch)
tree1b1b730c2187c0ced4b8b36ebf6ae7dd0a6cf704
parentf1d2de909467c2673e3fcb4a6ae9dc0cbd2c3191 (diff)
downloadnuttx-39845bd9d8d1c85bccbdc13865bd3533d7d25262.tar.gz
nuttx-39845bd9d8d1c85bccbdc13865bd3533d7d25262.tar.bz2
nuttx-39845bd9d8d1c85bccbdc13865bd3533d7d25262.zip
Move subsampling rate definitions from nxplayer.h to audio.h
-rw-r--r--apps/include/nxplayer.h17
-rw-r--r--apps/system/nxplayer/nxplayer.c11
-rw-r--r--nuttx/include/nuttx/audio/audio.h12
3 files changed, 20 insertions, 20 deletions
diff --git a/apps/include/nxplayer.h b/apps/include/nxplayer.h
index 76d6d3d15..158205256 100644
--- a/apps/include/nxplayer.h
+++ b/apps/include/nxplayer.h
@@ -53,19 +53,6 @@
/****************************************************************************
* Public Type Declarations
****************************************************************************/
-/* Fast-forward and rewind by sub-sampling may be supported. If so, then
- * this enumeration specifies the sub-sampling:
- */
-
-enum nxplayer_subsample_e
-{
- SUBSAMPLE_1X = 0, /* Normal speed (no direction change) */
- SUBSAMPLE_2X,
- SUBSAMPLE_4X,
- SUBSAMPLE_8X,
- SUBSAMPLE_16X
-};
-
/* This structure describes the internal state of the NxPlayer */
struct nxplayer_s
@@ -294,7 +281,7 @@ int nxplayer_resume(FAR struct nxplayer_s *pPlayer);
#ifndef CONFIG_AUDIO_EXCLUDE_FFORWARD
int nxplayer_fforward(FAR struct nxplayer_s *pPlayer,
- enum nxplayer_subsample_e subsample);
+ enum audio_subsample_e subsample);
#endif
/****************************************************************************
@@ -319,7 +306,7 @@ int nxplayer_fforward(FAR struct nxplayer_s *pPlayer,
#ifndef CONFIG_AUDIO_EXCLUDE_REWIND
int nxplayer_rewind(FAR struct nxplayer_s *pPlayer,
- enum nxplayer_subsample_e subsample);
+ enum audio_subsample_e subsample);
#endif
/****************************************************************************
diff --git a/apps/system/nxplayer/nxplayer.c b/apps/system/nxplayer/nxplayer.c
index cf834f852..444608198 100644
--- a/apps/system/nxplayer/nxplayer.c
+++ b/apps/system/nxplayer/nxplayer.c
@@ -38,18 +38,19 @@
****************************************************************************/
#include <nuttx/config.h>
-#include <nuttx/audio/audio.h>
-#include <debug.h>
#include <sys/types.h>
+#include <sys/ioctl.h>
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
-#include <sys/ioctl.h>
#include <errno.h>
#include <dirent.h>
+#include <debug.h>
+#include <nuttx/audio/audio.h>
#include <apps/nxplayer.h>
/****************************************************************************
@@ -1169,7 +1170,7 @@ int nxplayer_resume(FAR struct nxplayer_s *pPlayer)
#ifndef CONFIG_AUDIO_EXCLUDE_FFORWARD
int nxplayer_fforward(FAR struct nxplayer_s *pPlayer,
- enum nxplayer_subsample_e subsample)
+ enum audio_subsample_e subsample)
{
#warning Missing logic
return -ENOSYS;
@@ -1198,7 +1199,7 @@ int nxplayer_fforward(FAR struct nxplayer_s *pPlayer,
#ifndef CONFIG_AUDIO_EXCLUDE_REWIND
int nxplayer_rewind(FAR struct nxplayer_s *pPlayer,
- enum nxplayer_subsample_e subsample)
+ enum audio_subsample_e subsample)
{
#warning Missing logic
return -ENOSYS;
diff --git a/nuttx/include/nuttx/audio/audio.h b/nuttx/include/nuttx/audio/audio.h
index 761159d87..2903ed255 100644
--- a/nuttx/include/nuttx/audio/audio.h
+++ b/nuttx/include/nuttx/audio/audio.h
@@ -283,6 +283,18 @@
/****************************************************************************
* Public Types
****************************************************************************/
+/* Fast-forward and rewind by sub-sampling may be supported. If so, then
+ * this enumeration specifies the sub-sampling:
+ */
+
+enum nxplayer_subsample_e
+{
+ SUBSAMPLE_1X = 0, /* Normal speed (no direction change) */
+ SUBSAMPLE_2X,
+ SUBSAMPLE_4X,
+ SUBSAMPLE_8X,
+ SUBSAMPLE_16X
+};
/* Define the size of AP Buffer sample count base on CONFIG */