rockbox_ffi 0.6.0-aarch64-linux → 0.7.0-aarch64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/examples/play.rb +22 -5
- data/lib/rockbox_ffi/version.rb +1 -1
- data/vendor/librockbox_ffi.so +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8da8340c13efb4d27d525ccdc3f8e0edae2d1fd974c9ffaa5356eea91940eeca
|
|
4
|
+
data.tar.gz: 045dc2b72a0a7168aaaaeceb84add00b5f8eef8b96161a8b7e4674e0a948c7b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c3ad83a570583bf9c6b1eb3292c523319270c52c81c6a4b01d0968634e91c7de57c356625c45e9a3541020bed2589bb1c52b75bb973a329e4384a743682f148
|
|
7
|
+
data.tar.gz: 86836a702ab0792105cbbdbbab5f8bc7ce924b64d7253572a921697d87b91c7fa7bbf88ef6ec2b68473446d78e0b967ab6c37899375b8964f6f476ab9b1f721a
|
data/README.md
CHANGED
|
@@ -68,8 +68,8 @@ RockboxFFI::Player.open(volume: 0.8) do |player|
|
|
|
68
68
|
player.set_replaygain(RockboxFFI::ReplayGainMode::TRACK, 0.0, true)
|
|
69
69
|
player.set_crossfade(RockboxFFI::CrossfadeMode::ALWAYS)
|
|
70
70
|
# Queue entries may be local files, http(s):// URLs to remote media,
|
|
71
|
-
# or live-radio /
|
|
72
|
-
player.set_queue(["a.flac", "https://example.com/b.mp3", "http://radio.example/stream"])
|
|
71
|
+
# or live-radio streams, or HLS / MPEG-DASH manifests (.m3u8/.mpd) — mix and match freely.
|
|
72
|
+
player.set_queue(["a.flac", "https://example.com/b.mp3", "http://radio.example/stream", "https://cdn.example.com/live/main.m3u8"])
|
|
73
73
|
player.play
|
|
74
74
|
player.status # => {state: "playing", index: 0, ...}
|
|
75
75
|
end
|
data/examples/play.rb
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Play
|
|
3
|
+
# Play an audio source through the real output device.
|
|
4
4
|
#
|
|
5
|
-
#
|
|
5
|
+
# The queue entry can be a local file, a remote http(s):// URL, an
|
|
6
|
+
# internet-radio stream, or an HLS (.m3u8) / MPEG-DASH (.mpd) manifest —
|
|
7
|
+
# the engine detects each kind automatically.
|
|
8
|
+
#
|
|
9
|
+
# Run: ruby -Ilib examples/play.rb [path-or-URL]
|
|
10
|
+
# ruby -Ilib examples/play.rb hls # public HLS test stream
|
|
11
|
+
# ruby -Ilib examples/play.rb dash # public MPEG-DASH test stream
|
|
6
12
|
|
|
7
13
|
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
|
8
14
|
require "rockbox_ffi"
|
|
@@ -10,8 +16,15 @@ require "rockbox_ffi"
|
|
|
10
16
|
REPO = File.expand_path("../../..", __dir__)
|
|
11
17
|
FIXTURE = File.join(REPO, "crates", "rocksky", "fixtures", "08 - Internet Money - Speak(Explicit).m4a")
|
|
12
18
|
|
|
13
|
-
#
|
|
14
|
-
|
|
19
|
+
# Public adaptive-streaming test streams (see crates/rockbox-playback/README.md
|
|
20
|
+
# for more).
|
|
21
|
+
HLS_DEFAULT = "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8"
|
|
22
|
+
DASH_DEFAULT = "https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd"
|
|
23
|
+
|
|
24
|
+
# The queue accepts local files, http(s):// URLs (remote media / live radio),
|
|
25
|
+
# and HLS / MPEG-DASH manifest URLs.
|
|
26
|
+
arg = ARGV[0] || FIXTURE
|
|
27
|
+
file = { "hls" => HLS_DEFAULT, "dash" => DASH_DEFAULT }.fetch(arg, arg)
|
|
15
28
|
if !RockboxFFI.is_url?(file) && !File.exist?(file)
|
|
16
29
|
abort "no such file: #{file}"
|
|
17
30
|
end
|
|
@@ -39,11 +52,15 @@ trap("INT") do
|
|
|
39
52
|
end
|
|
40
53
|
|
|
41
54
|
# Poll status until playback finishes (state returns to "stopped").
|
|
55
|
+
# A live stream reports duration 0 and plays until Ctrl-C.
|
|
42
56
|
loop do
|
|
43
57
|
st = player.status
|
|
44
58
|
pos = st[:position_ms] / 1000.0
|
|
45
59
|
dur = st[:duration_ms] / 1000.0
|
|
46
|
-
|
|
60
|
+
clock = dur.zero? ? format("%.1fs / LIVE", pos) : format("%.1fs / %.1fs", pos, dur)
|
|
61
|
+
# The codec label carries the protocol for adaptive streams (e.g. "HLS AAC").
|
|
62
|
+
codec = st.dig(:metadata, :codec) || ""
|
|
63
|
+
printf("\r[%s] %s %s ", st[:state], codec, clock)
|
|
47
64
|
$stdout.flush
|
|
48
65
|
|
|
49
66
|
if st[:state] == "stopped" && st[:position_ms].positive?
|
data/lib/rockbox_ffi/version.rb
CHANGED
data/vendor/librockbox_ffi.so
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rockbox_ffi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Tsiry Sandratraina
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-09-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fiddle
|