rtlsdr 0.2.0 → 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 +4 -4
- data/lib/rtlsdr/ffi.rb +4 -3
- data/lib/rtlsdr/fftw.rb +30 -2
- data/lib/rtlsdr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdda82a845fb18a7c4e62aa92047ed89c380ff8cb4eeb09c0d67791fd6504fc2
|
|
4
|
+
data.tar.gz: 4427f96657f4c5be7e36693fc1c217ed138caf89128d3203201d4c76dbfc5599
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
-
#
|
|
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
|
data/lib/rtlsdr/version.rb
CHANGED