ALSA编程.docVIP

  • 1
  • 0
  • 约1.99万字
  • 约 16页
  • 2016-12-14 发布于河南
  • 举报
/**alsa?play?test? *ALSA用户空间编译,ALSA驱动的声卡在用户空间,不宜直接使用? *文件接口中,而应使用alsa-lib? *打开设置参数读写音频数据?ALSA全部使用alsa-lib中的API? *交叉编译? *export?LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH? *arm-linux-gcc?-o?alsa_play?alsa_play_test.c?-L.?-lasound? *需要交叉编译后的libasound.so库的支持? *? */?? #include?stdio.h?? #include?stdlib.h?? #include?alsa/asoundlib.h?? ?? int?main(int?argc,?char?*argv[])?? {?? ????int?i;?? ????int?ret;?? ????int?buf[128];?? ????unsigned?int?val;?? ????int?dir=0;?? ????char?*buffer;?? ????int?size;?? ????snd_pcm_uframes_t?frames;?? ????snd_pcm_uframes_t?periodsize;?? ????snd_pcm_t?*playback_handle;//PCM设备

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档