Skip to content

Commit 48424ed

Browse files
committed
v1.0.12
1 parent 8d0b29b commit 48424ed

17 files changed

Lines changed: 911 additions & 569 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source/lib/
2+
source/udp_player.conf

CHANGELOG.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
1-
# Changelog
1+
# Changelog
22

33
All notable changes to this project are documented in this file.
44

5+
## [1.0.12] – 2026-01-03
6+
### Changed
7+
- Configuration handling updated:
8+
- Config files are now stored in `~/.udp_player/udp_player.conf`
9+
- Config directory is created automatically on first start.
10+
11+
### Added
12+
- Debian package (`.deb`) installation support.
13+
- Desktop menu entry installed automatically via dpkg.
14+
- Linux capabilities set on installation (`cap_net_raw,cap_sys_nice+ep`), allowing the player to run **without sudo**.
15+
16+
### Removed
17+
- Requirement to start the player with `sudo` for real-time priority.
18+
19+
---
20+
21+
## [1.0.11] – 2025-12-22
22+
### Improved
23+
- Display of the audio output device status even when no audio stream is connected.
24+
525
## [1.0.10] – 2025-12-21
626
### Added
727
- New low-CPU VU meter implementation.
@@ -13,19 +33,16 @@ All notable changes to this project are documented in this file.
1333
- Audio thread priority increased to 40 for better real-time performance.
1434
- Buffer duplication during underruns optimized to further reduce audible artifacts.
1535

16-
1736
## [1.0.9] – 2025-12-14
1837
### Removed
1938
- Removed silence handling for resynchronisation – no longer required.
2039

2140
### Added
2241
- In the unlikely case of a missing audio block, the last valid block is repeated up to five times to prevent audible dropouts.
2342

24-
2543
## [1.0.8] – 2025-10-14
2644
### Fixed
27-
- recovering of frames improved
28-
45+
- Recovering of frames improved.
2946

3047
## [1.0.6] – 2025-10-14
3148
### Fixed
@@ -38,14 +55,14 @@ All notable changes to this project are documented in this file.
3855
### Fixed
3956
- Port setting: default value 5010 and alternative configurations now work correctly.
4057
- Endian setting now functions as expected.
41-
- Config file handling is now Linux-conform, stored at `/home/pi/.config/udp_player.cfg`.
58+
- Config file handling is now Linux-conform.
4259

4360
### Added
4461
- Separate settings for all available audio outputs.
4562
- VU meter display for audio signal levels.
4663

4764
## [1.0.4] – 2025-08-18
48-
###Added
65+
### Added
4966
- Option to select the audio output device (Headphones/Jack, HDMI, USB sound card).
5067

5168
## [1.0.3] – 2025-08-13
@@ -54,10 +71,9 @@ All notable changes to this project are documented in this file.
5471

5572
## [1.0.2] – 2025-08-13
5673
### Added
57-
- A separate settings form is now available.
58-
- If the `Hide` checkbox is enabled, the application window will remain permanently hidden once audio starts playing.
74+
- A separate settings form is now available.
75+
- If the `Hide` checkbox is enabled, the application window will remain permanently hidden once audio starts playing.
5976

6077
## [1.0.1] – 2025-07-27
6178
### Added
62-
- A binary has been added to /bin for quick and simple testing.
63-
79+
- A binary has been added to `/bin` for quick and simple testing.

README.md

Lines changed: 76 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
layout: default
33
title: Network Audio Receiver (UDP) for Raspberry Pi
44
description: Lightweight UDP stereo audio receiver for Raspberry Pi with very low latency via ALSA and PipeWire. Developed in Free Pascal on Debian Bookworm.
@@ -16,22 +16,23 @@ It outputs directly to **ALSA** (also compatible with **PipeWire** via ALSA emul
1616
* Receives **stereo audio over UDP** (e.g., RTP stream) with selectable audio output: 3.5 mm jack, HDMI, USB, and more (choose one device at a time)
1717
* Direct **ALSA audio output** for minimal delay
1818
* Fully compatible with **PipeWire** via ALSA emulation
19-
* Developed in **Free Pascal** using **Codetyphon** on **Debian Bookworm/Trixie**
19+
* Developed in **Free Pascal** using **Codetyphon** on **Debian Bookworm**
2020
* **No codec** → uncompressed audio, maximum quality, minimal processing delay
2121
* Supports multiple audio outputs: **3.5 mm jack, HDMI, USB, and more** (selectable in settings)
2222
* On startup, the window is visible
2323
* If the “Start Minimized” checkbox is selected, the application will start minimized
2424
* **Lightweight** with minimal dependencies (ALSA or PipeWire via ALSA)
25-
* Repeats the last valid audio block up to five times if new data is missing, preventing audible dropouts.
25+
2626
---
2727

2828
## 💡 Example Test Setup
2929

30-
* **Sender**: Raspberry Pi 4 streaming YouTube audio via Wi-Fi
31-
* **Receiver**: Raspberry Pi 4 or Pi 5 connected via Ethernet
30+
* **Sender**: Raspberry Pi 4 or Pi 5 streaming audio over UDP
31+
* **Receiver**: Raspberry Pi 4 or Pi 5 connected via Ethernet
3232
* **Output**: 3.5 mm jack → HiFi amplifier, or HDMI/USB audio
3333

34-
Result: Stable low-latency playback on a typical home network, even while streaming video via RealVNC.
34+
Result: Stable low-latency playback on a typical home network, even while streaming video.
35+
3536
---
3637

3738
## ▶️ Usage
@@ -44,10 +45,10 @@ Install `ffmpeg`:
4445
sudo apt install ffmpeg
4546
```
4647

47-
To transmit system audio, use the provided startup script **`StartFFmpegTransmitter.sh`**:
48+
To transmit system audio, use the provided startup script **StartFFmpegTransmitter.sh**:
4849

49-
1. Edit the script and replace the IP address with the address of your receiver.
50-
2. Set the port number to match the configuration on the receiver.
50+
1. Edit the script and replace the IP address with the address of your receiver.
51+
2. Set the port number to match the configuration on the receiver.
5152
3. Make the script executable:
5253

5354
```bash
@@ -64,31 +65,40 @@ Start the player:
6465
./udp_player
6566
```
6667

67-
A window appears and starts playback automatically. Select the desired audio output in the settings window.
68+
- The player **does not require sudo**, as the necessary capabilities (`cap_net_raw,cap_sys_nice+ep`) are set during installation.
69+
- On first start, it will create a **configuration file** at:
70+
71+
```
72+
/var/lib/udp_player/udp_player.conf
73+
```
74+
75+
- A window appears and starts playback automatically.
76+
- Select the desired audio output in the settings window.
77+
- Repeats the last valid audio block up to five times if new data is missing, preventing audible dropouts.
78+
6879
---
6980

7081
## ⚙️ Settings Description
7182

7283
Control / Field | Description
7384
--- | ---
74-
**Audio Output Selection** | Choose the audio output device (Headphones/JACK, HDMI, USB audio, etc.). If no configuration exists for a device, a default configuration is created automatically at program start.
85+
**Audio Output Selection** | Choose the audio output device (Headphones/JACK, HDMI, USB audio, etc.). If no configuration exists for a device, a default configuration is created automatically at first start.
7586
**IP** | IP address to receive audio from. Use `0.0.0.0` to listen on all network interfaces.
7687
**Port** | UDP port for incoming audio. Default is `5010`.
77-
**Network Buffer** | Size of the receive buffer in bytes. Must be at least as large as a single sent audio block.
7888
**Frequency** | Audio sample rate in Hz.
79-
**Latency** | Audio latency in samples. Typical values: 22000 for JACK/Headphones, 3000 for USB audio.
89+
**Latency** | Audio latency in samples. Typical values: 22000 for JACK/Headphones, 4000 for USB audio.
8090
**Swap Byte Order** | Enable this if the incoming audio uses a different byte order (big/little endian).
8191
**Hide Window** | If enabled, the application window remains minimized or hidden once audio starts.
82-
**Test changes** | This button mmediately applies the current settings without saving them.
92+
**Test changes** | This button immediately applies the current settings without saving them.
8393
**Save changes** | This button saves the current settings to the configuration file for future use.
84-
**Delete** | This button deletes the selected device configuration. If the device exists, it will be recreated with default values at the next program start.
94+
**Delete Device** | This button deletes the selected device configuration. If the device exists, it will be recreated with default values at the next program start.
8595

8696
---
8797

8898
## 🎯 Latency Optimization
8999

90-
* **Lower buffer size** → lower delay
91-
* **Too low** → possible dropouts or crackling audio
100+
* **Lower buffer size** → lower delay
101+
* **Too low** → possible dropouts or crackling audio
92102
* Best settings depend on:
93103
* Network type (**LAN** allows lower latency than Wi-Fi)
94104
* Raspberry Pi performance
@@ -104,8 +114,8 @@ If sound is too quiet:
104114
alsamixer
105115
```
106116

107-
* Press `F6` to select the right device
108-
* Raise the **Master** volume
117+
* Press `F6` to select the right device
118+
* Raise the **Master** volume
109119

110120
Or via terminal:
111121

@@ -114,6 +124,53 @@ amixer set 'Master' 100% unmute
114124
```
115125

116126
---
127+
# 📦 Installation / Deinstallation via dpkg
128+
129+
## Installation Steps
130+
131+
1. Copy the `.deb` package to your Raspberry Pi.
132+
133+
2. Install the package:
134+
135+
```bash
136+
sudo dpkg -i udp_player_x.y.z.deb
137+
```
138+
139+
This will install:
140+
141+
```
142+
/usr/bin/udp_player # Binary
143+
/usr/share/applications/... # Desktop menu entry
144+
~/.udp_player/ # Config folder (empty on first start)
145+
```
146+
147+
Necessary capabilities are automatically set (`cap_net_raw,cap_sys_nice+ep`) → no sudo required for running the player.
148+
149+
3. Start the player:
150+
151+
```bash
152+
udp_player
153+
or use the menu entry created during installation.
154+
```
155+
156+
---
157+
158+
## Deinstallation Steps
159+
160+
To remove the player completely:
161+
162+
```bash
163+
sudo dpkg -r udp_player
164+
```
165+
166+
This removes the binary and the menu entry.
167+
168+
To also remove the config folder (if you want a clean uninstall):
169+
170+
```bash
171+
rm -rf ~/.udp_player
172+
```
173+
117174

118175
## 📜 License
119176

bin/README.md

Lines changed: 73 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
layout: default
33
title: Network Audio Receiver (UDP) for Raspberry Pi
44
description: Lightweight UDP stereo audio receiver for Raspberry Pi with very low latency via ALSA and PipeWire. Developed in Free Pascal on Debian Bookworm.
@@ -27,11 +27,12 @@ It outputs directly to **ALSA** (also compatible with **PipeWire** via ALSA emul
2727

2828
## 💡 Example Test Setup
2929

30-
* **Sender**: Raspberry Pi 4 or pi 5 streaming YouTube audio via Wi-Fi
31-
* **Receiver**: Raspberry Pi 4 or pi 5 connected via Ethernet
30+
* **Sender**: Raspberry Pi 4 or Pi 5 streaming audio over UDP
31+
* **Receiver**: Raspberry Pi 4 or Pi 5 connected via Ethernet
3232
* **Output**: 3.5 mm jack → HiFi amplifier, or HDMI/USB audio
3333

34-
Result: Stable low-latency playback on a typical home network, even while streaming video via RealVNC.
34+
Result: Stable low-latency playback on a typical home network, even while streaming video.
35+
3536
---
3637

3738
## ▶️ Usage
@@ -44,10 +45,10 @@ Install `ffmpeg`:
4445
sudo apt install ffmpeg
4546
```
4647

47-
To transmit system audio, use the provided startup script **`StartFFmpegTransmitter.sh`**:
48+
To transmit system audio, use the provided startup script **StartFFmpegTransmitter.sh**:
4849

49-
1. Edit the script and replace the IP address with the address of your receiver.
50-
2. Set the port number to match the configuration on the receiver.
50+
1. Edit the script and replace the IP address with the address of your receiver.
51+
2. Set the port number to match the configuration on the receiver.
5152
3. Make the script executable:
5253

5354
```bash
@@ -63,21 +64,29 @@ Start the player:
6364
```bash
6465
./udp_player
6566
```
66-
A window appears and starts playback automatically when UDP packets arrive.
67-
Select the desired audio output in the settings window.
68-
Repeats the last valid audio block up to five times if new data is missing, preventing audible dropouts.
67+
68+
- The player **does not require sudo**, as the necessary capabilities (`cap_net_raw,cap_sys_nice+ep`) are set during installation.
69+
- On first start, it will create a **configuration file** at:
70+
71+
```
72+
/var/lib/udp_player/udp_player.conf
73+
```
74+
75+
- A window appears and starts playback automatically.
76+
- Select the desired audio output in the settings window.
77+
- Repeats the last valid audio block up to five times if new data is missing, preventing audible dropouts.
78+
6979
---
7080

7181
## ⚙️ Settings Description
7282

7383
Control / Field | Description
7484
--- | ---
75-
**Audio Output Selection** | Choose the audio output device (Headphones/JACK, HDMI, USB audio, etc.). If no configuration exists for a device, a default configuration is created automatically at program start.
85+
**Audio Output Selection** | Choose the audio output device (Headphones/JACK, HDMI, USB audio, etc.). If no configuration exists for a device, a default configuration is created automatically at first start.
7686
**IP** | IP address to receive audio from. Use `0.0.0.0` to listen on all network interfaces.
7787
**Port** | UDP port for incoming audio. Default is `5010`.
78-
**Network Buffer** | Size of the receive buffer in bytes. Must be at least as large as a single sent audio block.
7988
**Frequency** | Audio sample rate in Hz.
80-
**Latency** | Audio latency in samples. Typical values: 22000 for JACK/Headphones, 3000 for USB audio.
89+
**Latency** | Audio latency in samples. Typical values: 22000 for JACK/Headphones, 4000 for USB audio.
8190
**Swap Byte Order** | Enable this if the incoming audio uses a different byte order (big/little endian).
8291
**Hide Window** | If enabled, the application window remains minimized or hidden once audio starts.
8392
**Test changes** | This button immediately applies the current settings without saving them.
@@ -88,8 +97,8 @@ Control / Field | Description
8897

8998
## 🎯 Latency Optimization
9099

91-
* **Lower buffer size** → lower delay
92-
* **Too low** → possible dropouts or crackling audio
100+
* **Lower buffer size** → lower delay
101+
* **Too low** → possible dropouts or crackling audio
93102
* Best settings depend on:
94103
* Network type (**LAN** allows lower latency than Wi-Fi)
95104
* Raspberry Pi performance
@@ -105,8 +114,8 @@ If sound is too quiet:
105114
alsamixer
106115
```
107116

108-
* Press `F6` to select the right device
109-
* Raise the **Master** volume
117+
* Press `F6` to select the right device
118+
* Raise the **Master** volume
110119

111120
Or via terminal:
112121

@@ -115,6 +124,53 @@ amixer set 'Master' 100% unmute
115124
```
116125

117126
---
127+
# 📦 Installation / Deinstallation via dpkg
128+
129+
## Installation Steps
130+
131+
1. Copy the `.deb` package to your Raspberry Pi.
132+
133+
2. Install the package:
134+
135+
```bash
136+
sudo dpkg -i udp_player_x.y.z.deb
137+
```
138+
139+
This will install:
140+
141+
```
142+
/usr/bin/udp_player # Binary
143+
/usr/share/applications/... # Desktop menu entry
144+
~/.udp_player/ # Config folder (empty on first start)
145+
```
146+
147+
Necessary capabilities are automatically set (`cap_net_raw,cap_sys_nice+ep`) → no sudo required for running the player.
148+
149+
3. Start the player:
150+
151+
```bash
152+
udp_player
153+
or use the menu entry created during installation.
154+
```
155+
156+
---
157+
158+
## Deinstallation Steps
159+
160+
To remove the player completely:
161+
162+
```bash
163+
sudo dpkg -r udp_player
164+
```
165+
166+
This removes the binary and the menu entry.
167+
168+
To also remove the config folder (if you want a clean uninstall):
169+
170+
```bash
171+
rm -rf ~/.udp_player
172+
```
173+
118174

119175
## 📜 License
120176

0 commit comments

Comments
 (0)