qiaohaijiao commented on code in PR #7717:
URL: https://github.com/apache/nuttx/pull/7717#discussion_r1037776459


##########
arch/sim/src/sim/sim_alsa.c:
##########
@@ -116,6 +177,32 @@ static const struct audio_ops_s g_sim_audio_ops =
   .release       = sim_audio_release,
 };
 
+static const struct sim_codec_ops_s g_mp3_dec =
+{
+  AUDIO_FMT_MP3,
+  AUDCODEC_DEC,
+  sim_audio_mp3_init,
+  sim_audio_mp3_samples,
+  sim_audio_mp3_decode,
+  sim_audio_mp3_uninit
+};
+
+static const struct sim_codec_ops_s g_pcm_codec =
+{
+  AUDIO_FMT_PCM,
+  AUDCODEC_DEC | AUDCODEC_ENC,
+  sim_audio_pcm_init,
+  NULL,
+  sim_audio_pcm_process,
+  sim_audio_pcm_uninit,
+};
+
+static const struct sim_codec_ops_s g_codec_s[] =

Review Comment:
   Hi pkarashchenko:
   there is no copy.  In func `sim_audio_config_ops`,  use reference of 
g_pcm_codec or g_mp3_dec.



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to