Examples¶
Table of contents:
Basic sender and receiver¶
-
Basic sender example.
This example creates a sender and connects it to remote receiver. Then it generates a 10-second beep and writes it to the sender.
basic_sender_from_pulseaudio.c
Basic sender example.
This example creates a sender and connects it to remote receiver. Then it records audio stream from PulseAudio and writes it to the sender.
basic_receiver_to_pulseaudio.c
Basic receiver example.
This example creates a receiver and binds it to a known address. Then it reads audio stream from the receiver and plays it using PulseAudio.
Network protocols¶
-
Send and receive samples using bare RTP.
This example creates a receiver and binds it to an RTP endpoint. Then it creates a sender and connects it to the receiver endpoint. Then it starts writing audio stream to the sender and reading it from receiver.
send_receive_rtp_with_fecframe.c
Send and receive samples using RTP and FECFRAME.
- This example is like send_receive_rtp.c, but it creates two endpoints:
- the first, source endpoint is used to transmit audio stream
- the first, repair endpoint is used to transmit redundant stream
The redundant stream is used on receiver to recover lost audio packets. This is useful on unreliable networks.
Miscellaneous¶
-
URI manipulation example.
This example demonstrates how to build endpoint URI and access its individual parts.