| 1 | \page oggopus Streaming Ogg Opus file |
| 2 | |
| 3 | This example shows how to stream an Ogg Opus file to a voice channel. This example requires some additional dependencies, namely `libogg` and `opusfile`. |
| 4 | |
| 5 | \include{cpp} oggopus.cpp |
| 6 | |
| 7 | You can compile this example using the following command |
| 8 | |
| 9 | ```bash |
| 10 | c++ /path/to/source.cc -ldpp -lopus -lopusfile -logg -I/usr/include/opus |
| 11 | ``` |
| 12 | |
| 13 | ## Using liboggz |
| 14 | |
| 15 | You can use `liboggz` to stream an Ogg Opus file to discord voice channel. |
| 16 | `liboggz` provides higher level abstraction and useful APIs. Some features `liboggz` provides include: seeking and timestamp interpretation. |
| 17 | Read more on the [documentation](https://www.xiph.org/oggz/doc/). |
| 18 | |
| 19 | \include{cpp} oggopus2.cpp |
| 20 | |
| 21 | You can compile this example using the following command: |
| 22 | |
| 23 | ```bash |
| 24 | c++ /path/to/source.cc -ldpp -loggz |
| 25 | ``` |