Debian Codegraph @

docpages/example_programs/music_and_audio/mp3.md

raw symbols SCIP
1 \page stream-mp3-discord-bot Streaming MP3 Files
2
3 To stream MP3 files via D++ you need to link an additional dependency to your bot, namely `libmpg123`. It is relatively simple when linking this library to your bot to then decode audio to PCM and send it to the dpp::discord_voice_client::send_audio_raw function as shown below:
4
5 \include{cpp} mp3.cpp
6
7 To compile this program you must remember to specify `libmpg123` alongside `libdpp` in the build command, for example:
8
9 ```bash
10 g++ -std=c++20 -o musictest musictest.cpp -lmpg123 -ldpp
11 ```
12
13 \include{doc} install_prebuilt_footer.dox