xiaoxiang781216 commented on a change in pull request #522: URL: https://github.com/apache/incubator-nuttx-apps/pull/522#discussion_r542375697
########## 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: Done. ########## 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: Done. ########## 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: Done. ---------------------------------------------------------------- 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: us...@infra.apache.org