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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35a95e714d15cbe6ef8a424ae9ba8313a57c8a130a7c7ef01f77d56bb087c6b0
4
- data.tar.gz: 568caa44c1c1792fd2f084c9e07e7e8d7d9d354394b14a9a53f6e59363df67af
3
+ metadata.gz: 25a6b381ae21dc547635e3a29bef5e58cdf2824619cc22e2d590964f64b3a11c
4
+ data.tar.gz: 7a3049fcf8233cb3a67bf5d2616c28b6fd2501743ed61d4ab86b89cc61f80db4
5
5
  SHA512:
6
- metadata.gz: a5c84973dcb05221f7d190ebb59e9e5ed3916123a3799ecf523db9257de84fe5fbba7fbd822f4a9e8ab49907952ae3c93d0d703e2328a7a6259312c670463e04
7
- data.tar.gz: b1b75343e699340e46957efd6de84c5ac9680707eff819ea8e68a9e1043d9e274f4962c801c9196e8d65a8f45e5dafcfc05accfe3f42c960d54b674c1947e6f2
6
+ metadata.gz: 35fe9853e8020471633b58882c8fbbcfb47c194ee827157a2269cc113c7526e98db81b56c16122388736cdee8ab28480eff7aa3f5c2eae6fc673211f6bf9c114
7
+ data.tar.gz: 1aa5bf1e93395aef9b057a72f7bb0f6a5724771080ac890d0c9749c4e4b53650f74489721a63ce0932c9245fe15f3364f2f463519a2045424b08aff7ee92d73f
@@ -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*)"
@@ -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
- ptr = Lib.rb_player_new_with_config_ex(
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]),
@@ -1,3 +1,3 @@
1
1
  module RockboxFFI
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
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.5.1
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-16 00:00:00.000000000 Z
11
+ date: 2026-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fiddle