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/12/14 12:46:27 UTC

[GitHub] [incubator-nuttx-apps] ghn-certi commented on a change in pull request #522: system: nxplayer and nxrecorder shouldn't hardcode message length to 16

ghn-certi commented on a change in pull request #522:
URL: https://github.com/apache/incubator-nuttx-apps/pull/522#discussion_r542355231



##########
File path: system/nxplayer/nxplayer.c
##########
@@ -1932,9 +1933,19 @@ static int nxplayer_playinternal(FAR struct nxplayer_s *pplayer,
       ioctl(pplayer->dev_fd, AUDIOIOC_CONFIGURE, (unsigned long)&cap_desc);
     }
 
+  /* Query the audio device for it's preferred buffer count */
+
+  if (ioctl(pplayer->dev_fd, AUDIOIOC_GETBUFFERINFO,
+            (unsigned long)&buf_info)) != OK)
+    {
+      /* Driver doesn't report it's buffer size.  Use our default. */

Review comment:
       ```suggestion
         /* Driver doesn't report its buffer size.  Use our default. */
   ```

##########
File path: system/nxplayer/nxplayer.c
##########
@@ -1932,9 +1933,19 @@ static int nxplayer_playinternal(FAR struct nxplayer_s *pplayer,
       ioctl(pplayer->dev_fd, AUDIOIOC_CONFIGURE, (unsigned long)&cap_desc);
     }
 
+  /* Query the audio device for it's preferred buffer count */

Review comment:
       ```suggestion
     /* Query the audio device for its preferred buffer count */
   ```

##########
File path: system/nxrecorder/nxrecorder.c
##########
@@ -844,9 +845,19 @@ int nxrecorder_recordraw(FAR struct nxrecorder_s *precorder,
       goto err_out;
     }
 
+  /* Query the audio device for it's preferred buffer count */
+
+  if (ioctl(precorder->dev_fd, AUDIOIOC_GETBUFFERINFO,
+            (unsigned long)&buf_info)) != OK)
+    {
+      /* Driver doesn't report it's buffer size.  Use our default. */

Review comment:
       ```suggestion
         /* Driver doesn't report its buffer size.  Use our default. */
   ```

##########
File path: system/nxrecorder/nxrecorder.c
##########
@@ -844,9 +845,19 @@ int nxrecorder_recordraw(FAR struct nxrecorder_s *precorder,
       goto err_out;
     }
 
+  /* Query the audio device for it's preferred buffer count */

Review comment:
       ```suggestion
     /* Query the audio device for its preferred buffer count */
   ```




----------------------------------------------------------------
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