===代码请参考Alsa中的aplay.c===
基本流程如下:
1.call open64(MusicFile) to open MusicFile
2.call snd_pcm_open(pcm_name, SND_PCM_STREAM_PLAYBACK) to open pcm device
3.call snd_pcm_hw_params_set_XXX() to set params(access/channels/rate/...)
4.call snd_pcm_hw_params() to set params to pcm device
5.call read() to read MusicFile
6.call snd_pcm_writei() to play MusicFile
7.call snd_pcm_close() to close pcm device
8.call close() to close MusicFile
意见反馈:
1.输入的声音文件是raw编码格式的
2.播放的音质比较好
基本流程如下:
1.call open64(MusicFile) to open MusicFile
2.call snd_pcm_open(pcm_name, SND_PCM_STREAM_PLAYBACK) to open pcm device
3.call snd_pcm_hw_params_set_XXX() to set params(access/channels/rate/...)
4.call snd_pcm_hw_params() to set params to pcm device
5.call read() to read MusicFile
6.call snd_pcm_writei() to play MusicFile
7.call snd_pcm_close() to close pcm device
8.call close() to close MusicFile
意见反馈:
1.输入的声音文件是raw编码格式的
2.播放的音质比较好