rockbox_ffi 0.5.1 → 0.6.0
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/lib/rockbox_ffi/ffi.rb +1 -0
- data/lib/rockbox_ffi/player.rb +13 -2
- data/lib/rockbox_ffi/version.rb +1 -1
- 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: 25a6b381ae21dc547635e3a29bef5e58cdf2824619cc22e2d590964f64b3a11c
|
|
4
|
+
data.tar.gz: 7a3049fcf8233cb3a67bf5d2616c28b6fd2501743ed61d4ab86b89cc61f80db4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35fe9853e8020471633b58882c8fbbcfb47c194ee827157a2269cc113c7526e98db81b56c16122388736cdee8ab28480eff7aa3f5c2eae6fc673211f6bf9c114
|
|
7
|
+
data.tar.gz: 1aa5bf1e93395aef9b057a72f7bb0f6a5724771080ac890d0c9749c4e4b53650f74489721a63ce0932c9245fe15f3364f2f463519a2045424b08aff7ee92d73f
|
data/lib/rockbox_ffi/ffi.rb
CHANGED
|
@@ -111,6 +111,7 @@ module RockboxFFI
|
|
|
111
111
|
extern "void* rb_player_new()"
|
|
112
112
|
extern "void* rb_player_new_with_config(uint32_t, float, float, int32_t, float, bool, int32_t, uint32_t, uint32_t, uint32_t, uint32_t, int32_t)"
|
|
113
113
|
extern "void* rb_player_new_with_config_ex(uint32_t, float, float, int32_t, float, bool, int32_t, uint32_t, uint32_t, uint32_t, uint32_t, int32_t, void*, uint32_t)"
|
|
114
|
+
extern "void* rb_player_new_with_output(void*, uint32_t, float, float, int32_t, float, bool, int32_t, uint32_t, uint32_t, uint32_t, uint32_t, int32_t, void*, uint32_t)"
|
|
114
115
|
extern "void rb_player_free(void*)"
|
|
115
116
|
extern "void rb_player_set_queue_json(void*, void*)"
|
|
116
117
|
extern "void rb_player_enqueue(void*, void*)"
|
data/lib/rockbox_ffi/player.rb
CHANGED
|
@@ -30,6 +30,13 @@ module RockboxFFI
|
|
|
30
30
|
fade_in_delay_ms: 0,
|
|
31
31
|
fade_in_duration_ms: 2000,
|
|
32
32
|
mix_mode: MixMode::CROSSFADE,
|
|
33
|
+
# Audio output backend. nil/"" => cpal (the default device). Other specs:
|
|
34
|
+
# "stdout" (or "-"), "fifo:/path", "unix:/path" (listen),
|
|
35
|
+
# "unix-connect:/path", "tcp:host:port" (listen), "tcp-connect:host:port".
|
|
36
|
+
# A listening socket blocks until a client connects. In stdout mode fd 1 IS
|
|
37
|
+
# the raw S16LE stereo PCM stream, so the host must keep stdout clean
|
|
38
|
+
# (e.g. pipe to `ffplay -f s16le -ar 44100 -ac 2 -`).
|
|
39
|
+
output: nil,
|
|
33
40
|
resume_file: nil, # an .m3u8 to auto-persist queue + position to
|
|
34
41
|
resume_save_interval_ms: 0 # 0 => 5 s default
|
|
35
42
|
}.freeze
|
|
@@ -55,11 +62,15 @@ module RockboxFFI
|
|
|
55
62
|
|
|
56
63
|
# Create a player with configuration overrides (see DEFAULT_CONFIG keys).
|
|
57
64
|
# sample_rate: 0 means the device default. Passing +resume_file:+ enables
|
|
58
|
-
# auto-persisting the queue + exact position to that .m3u8 file.
|
|
65
|
+
# auto-persisting the queue + exact position to that .m3u8 file. +output:+
|
|
66
|
+
# selects the audio backend (nil/"" => cpal; see DEFAULT_CONFIG for the
|
|
67
|
+
# full spec-string list).
|
|
59
68
|
def initialize(**opts)
|
|
60
69
|
c = DEFAULT_CONFIG.merge(opts)
|
|
61
70
|
resume_file = c[:resume_file].nil? ? nil : c[:resume_file].to_s
|
|
62
|
-
|
|
71
|
+
output = c[:output].nil? || c[:output].to_s.empty? ? nil : c[:output].to_s
|
|
72
|
+
ptr = Lib.rb_player_new_with_output(
|
|
73
|
+
output,
|
|
63
74
|
Integer(c[:sample_rate]), Float(c[:buffer_seconds]), Float(c[:volume]),
|
|
64
75
|
Integer(c[:replaygain_mode]), Float(c[:replaygain_preamp_db]),
|
|
65
76
|
RockboxFFI.b(c[:replaygain_prevent_clipping]), Integer(c[:crossfade_mode]),
|
data/lib/rockbox_ffi/version.rb
CHANGED
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.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tsiry Sandratraina
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fiddle
|