the simplest audio player based on FFmpeg
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
simplest_ffmpeg_audio_decoder removetext Mar 12, 2016
simplest_ffmpeg_audio_player fix noise problem Mar 12, 2016
.gitignore multi-platform Feb 12, 2015
ReadMe.txt removetext Mar 12, 2016
simplest_ffmpeg_audio_player2.sln add2proj Jul 14, 2015
simplest_ffmpeg_audio_player2.suo fix noise problem Mar 12, 2016


最简单的基于FFmpeg的音频播放器 2 (SDL 2.0)
Simplest FFmpeg Audio Player 2 (SDL 2.0)

雷霄骅 Lei Xiaohua
Communication University of China / Digital TV Technology


该版本使用SDL 2.0替换了第一个版本中的SDL 1.0。
注意:SDL 2.0中音频解码的API并无变化。唯一变化的地方在于
其回调函数的中的Audio Buffer并没有完全初始化,需要手动初始化。
本例子中即SDL_memset(stream, 0, len);

This software decode and play audio streams.
Suitable for the beginner of FFmpeg.
The solution contains 3 projects:
simplest_ffmpeg_audio_player: Audio player based on FFmpeg and SDL.
simplest_ffmpeg_audio_decoder: Audio decoder. Uses libavcodec and libavformat.
simplest_audio_play_sdl2: Example about using SDL2 play PCM data.

This version use SDL 2.0 instead of SDL 1.2 in version 1
Note:The good news for audio is that, with one exception, 
it's entirely backwards compatible with 1.2.
That one really important exception: The audio callback 
does NOT start with a fully initialized buffer anymore. 
You must fully write to the buffer in all cases. In this 
example it is SDL_memset(stream, 0, len);