Audio streaming using C++ tutorial and sample code [closed]

不问归期 提交于 2019-12-20 18:43:33

问题


I would like to learn basics of audio streaming. In particular, I would like to learn how to capture audio from a computer mic, and in real time stream it so that another user can listen to it live. I would like to do it on Windows.

Is there any good tutorial that explains how it is done and some sample C++ code that I can take a look for more details?

Also I heard ASIO provides a low latency library, so I am interested in that.


回答1:


Maybe here would be a good place to start, if you're using Windows?

Have a read of that page and look at the WASAPI as well.

You can capture raw audio directly from the device using the IAudioCaptureClient

I have been involved in projects involving real time streaming of audio and have used aac as the audio format and Live555 for a streaming library. These might be a good place to start.




回答2:


For recording and playing audio on Windows I would recommend the waveform audio API. You have an example here for recording data from the mic.

For the streaming part, if you want to use an already available multimedia streaming server, i would recommend icecast, with its API lib.

If you want to implement the network streaming by yourself, then you can use the asio lib. You have some examples here.

For audio playback on the client side, there is a tutorial using waveform API here.



来源:https://stackoverflow.com/questions/11579217/audio-streaming-using-c-tutorial-and-sample-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!