xiaoxiang781216 commented on code in PR #9308:
URL: https://github.com/apache/nuttx/pull/9308#discussion_r1196824848
##########
arch/sim/src/sim/posix/sim_alsa.c:
##########
@@ -581,6 +585,12 @@ static int sim_audio_ioctl(struct audio_lowerhalf_s *dev,
int cmd,
info->nbuffers = priv->nbuffers;
info->buffer_size = priv->buffer_size;
+
+ if (!priv->playback && priv->ops->get_samples)
Review Comment:
why check playback flag
##########
arch/sim/src/sim/posix/sim_alsa.c:
##########
@@ -581,6 +585,12 @@ static int sim_audio_ioctl(struct audio_lowerhalf_s *dev,
int cmd,
info->nbuffers = priv->nbuffers;
info->buffer_size = priv->buffer_size;
+
+ if (!priv->playback && priv->ops->get_samples)
+ {
+ info->buffer_size = priv->ops->get_samples(priv->codec) *
Review Comment:
should we use MIN here?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]