rtlsdr 0.2.1 → 0.2.3

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: '019e21a841f8f9f9aaf543741487c734d4b1c7b2ff4b2bfd20e37cf56fbfcf00'
4
- data.tar.gz: c4c3657ae68d2b5f8f2b931c8256447b9ab8feb0d0bbdfe61e7d035e34ee4053
3
+ metadata.gz: bdda82a845fb18a7c4e62aa92047ed89c380ff8cb4eeb09c0d67791fd6504fc2
4
+ data.tar.gz: 4427f96657f4c5be7e36693fc1c217ed138caf89128d3203201d4c76dbfc5599
5
5
  SHA512:
6
- metadata.gz: cf8de21d50dbf21fd92dfec27cdeab872ccf83e3bbe1132ebbeab74bba98ae4e84da90f794574fc8c742da761768f2f49b26f5ea3c345b49960646a0e63ea053
7
- data.tar.gz: 5d587f36838184747666800ac202e52d33584169926f9cd2bd72db1d39a5f4189be4b7025898c675f274134ba326537f08782f9682d7e6fe58dce0921f21b497
6
+ metadata.gz: fa87ae066f74a465ba70b33ad0ec5d0619abd698216911325754182e2bfb6b6a872aef24e82d430ebea12a304b342fbf007d5afbe36464011ee9f4806bd844e1
7
+ data.tar.gz: 96b90536e0c46f750ae06d22ff5608dbfdfeb06879221f7ada51c5ec2c50560029744d8296c170a69173c33e4e07e472bdc64ca96e1ed475736e19affdb62835
data/lib/rtlsdr/ffi.rb CHANGED
@@ -140,10 +140,11 @@ module RTLSDR
140
140
  attach_function :rtlsdr_get_offset_tuning, [:rtlsdr_dev_t], :int
141
141
 
142
142
  # Streaming functions
143
+ # Note: blocking: true releases the GVL so other Ruby threads can run
143
144
  attach_function :rtlsdr_reset_buffer, [:rtlsdr_dev_t], :int
144
- attach_function :rtlsdr_read_sync, %i[rtlsdr_dev_t pointer int pointer], :int
145
- attach_function :rtlsdr_wait_async, %i[rtlsdr_dev_t rtlsdr_read_async_cb_t pointer], :int
146
- attach_function :rtlsdr_read_async, %i[rtlsdr_dev_t rtlsdr_read_async_cb_t pointer uint32 uint32], :int
145
+ attach_function :rtlsdr_read_sync, %i[rtlsdr_dev_t pointer int pointer], :int, blocking: true
146
+ attach_function :rtlsdr_wait_async, %i[rtlsdr_dev_t rtlsdr_read_async_cb_t pointer], :int, blocking: true
147
+ attach_function :rtlsdr_read_async, %i[rtlsdr_dev_t rtlsdr_read_async_cb_t pointer uint32 uint32], :int, blocking: true
147
148
  attach_function :rtlsdr_cancel_async, [:rtlsdr_dev_t], :int
148
149
 
149
150
  # Bias tee functions
data/lib/rtlsdr/fftw.rb CHANGED
@@ -45,21 +45,49 @@ module RTLSDR
45
45
  attr_reader :load_error
46
46
  end
47
47
 
48
- # FFTW planning flags
48
+ # @!group FFTW Planning Flags
49
+ # These constants control how FFTW plans are created. Higher effort flags
50
+ # produce faster transforms but take longer to plan.
51
+
52
+ # @return [Integer] Measure execution time to find optimal plan
49
53
  FFTW_MEASURE = 0
54
+
55
+ # @return [Integer] Allow input array to be destroyed during planning
50
56
  FFTW_DESTROY_INPUT = 1
57
+
58
+ # @return [Integer] Don't assume arrays are aligned in memory
51
59
  FFTW_UNALIGNED = 2
60
+
61
+ # @return [Integer] Minimize memory usage at cost of speed
52
62
  FFTW_CONSERVE_MEMORY = 4
63
+
64
+ # @return [Integer] Try all possible algorithms (very slow planning)
53
65
  FFTW_EXHAUSTIVE = 8
66
+
67
+ # @return [Integer] Preserve input array contents during transform
54
68
  FFTW_PRESERVE_INPUT = 16
69
+
70
+ # @return [Integer] Like MEASURE but try harder (slower planning)
55
71
  FFTW_PATIENT = 32
72
+
73
+ # @return [Integer] Use quick heuristic to pick plan (fast planning, default)
56
74
  FFTW_ESTIMATE = 64
75
+
76
+ # @return [Integer] Only use wisdom (cached plans), fail if none available
57
77
  FFTW_WISDOM_ONLY = 2_097_152
58
78
 
59
- # FFT direction
79
+ # @!endgroup
80
+
81
+ # @!group FFT Direction Constants
82
+
83
+ # @return [Integer] Forward FFT direction (time to frequency domain)
60
84
  FFTW_FORWARD = -1
85
+
86
+ # @return [Integer] Backward/Inverse FFT direction (frequency to time domain)
61
87
  FFTW_BACKWARD = 1
62
88
 
89
+ # @!endgroup
90
+
63
91
  if available?
64
92
  # Memory allocation
65
93
  attach_function :fftw_malloc, [:size_t], :pointer
@@ -12,5 +12,5 @@ module RTLSDR
12
12
  #
13
13
  # @return [String] Current gem version
14
14
  # @since 0.1.0
15
- VERSION = "0.2.1"
15
+ VERSION = "0.2.3"
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtlsdr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - joshfng