ffi-openmpt 0.4.1 → 0.5.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/.rubocop.yml +4 -2
- data/{.rubocop_ffi-openmpt.yml → .rubocop_todo.yml} +14 -1
- data/CHANGES.md +13 -0
- data/ffi-openmpt.gemspec +2 -1
- data/lib/ffi/openmpt/api.rb +17 -0
- data/lib/ffi/openmpt/module.rb +35 -0
- data/lib/ffi/openmpt/version.rb +1 -1
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72575e8314c200ad59e22003ac2fe9c2887239031b9aa6c1299c14330fa7e9dd
|
4
|
+
data.tar.gz: 1b6130bdc3cd3188c49fc23515b7796fa738070ef39391bef0e8b97e2a86269e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c1479cf17314e0a5244f00879840af09ea011a4dbc922d174a11a6bd8868865595ee42c2cd1414575db6936a28429bcc07f75a04e6c4d47d1f2e1c44cfa6e61
|
7
|
+
data.tar.gz: 22814451d1f956feb0156f87794ab5adc13558e8d6d079a1a21ca8394de29dc855504e6e61c20a6a028bf9ac10fa16c95c991e6b3c41a027744a5507fc48a595
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
require: rubocop-performance
|
2
|
+
|
3
|
+
inherit_from: .rubocop_todo.yml
|
2
4
|
|
3
5
|
# Turn this off for now. CI checks different versions of ruby anyway.
|
4
6
|
Gemspec/RequiredRubyVersion:
|
@@ -48,7 +50,7 @@ Metrics/MethodLength:
|
|
48
50
|
|
49
51
|
# Set a more reasonable class length and ignore failures in the tests.
|
50
52
|
Metrics/ClassLength:
|
51
|
-
Max:
|
53
|
+
Max: 250
|
52
54
|
Exclude:
|
53
55
|
- 'test/**/*.rb'
|
54
56
|
|
@@ -1,13 +1,26 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2019-04-13 17:37:59 +0100 using RuboCop version 0.67.2.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
+
# Offense count: 10
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
Layout/EmptyLineAfterGuardClause:
|
12
|
+
Exclude:
|
13
|
+
- 'examples/mod-2-raw'
|
14
|
+
- 'lib/ffi/openmpt/module.rb'
|
15
|
+
|
9
16
|
# Offense count: 1
|
10
17
|
Style/Documentation:
|
11
18
|
Exclude:
|
12
19
|
- 'test/**/*'
|
13
20
|
- 'lib/**/*'
|
21
|
+
|
22
|
+
# Offense count: 1
|
23
|
+
# Cop supports --auto-correct.
|
24
|
+
Style/RedundantBegin:
|
25
|
+
Exclude:
|
26
|
+
- 'lib/ffi/openmpt/module.rb'
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changes log for the Ruby OpenMPT library (ffi-openmpt)
|
2
2
|
|
3
|
+
## Version 0.5.0
|
4
|
+
|
5
|
+
* Nail down rubocop version and update todo list.
|
6
|
+
* Add rubocop-performance to the setup.
|
7
|
+
* Wrap some libopenmpt playing info functions.
|
8
|
+
* Add the informational calls to the ruby interface.
|
9
|
+
* Wrap the speed and tempo libopenmpt functions.
|
10
|
+
* Add the speed and tempo calls to the ruby interface.
|
11
|
+
* Wrap the current playing channels libopenmpt function.
|
12
|
+
* Add current playing channels to the ruby interface.
|
13
|
+
* Wrap the VU meter libopenmpt functions.
|
14
|
+
* Add VU meter calls to the ruby interface.
|
15
|
+
|
3
16
|
## Version 0.4.1
|
4
17
|
|
5
18
|
* Use an explicit begin block in Module#get_names.
|
data/ffi-openmpt.gemspec
CHANGED
@@ -36,5 +36,6 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency 'coveralls', '~> 0.8'
|
37
37
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
38
38
|
spec.add_development_dependency 'rake', '~> 10.0'
|
39
|
-
spec.add_development_dependency 'rubocop', '
|
39
|
+
spec.add_development_dependency 'rubocop', '0.67.2'
|
40
|
+
spec.add_development_dependency 'rubocop-performance', '1.1.0'
|
40
41
|
end
|
data/lib/ffi/openmpt/api.rb
CHANGED
@@ -150,6 +150,23 @@ module FFI
|
|
150
150
|
attach_function :openmpt_module_set_position_order_row,
|
151
151
|
[:pointer, :int, :int], :double
|
152
152
|
|
153
|
+
# Real-time playing information calls
|
154
|
+
attach_function :openmpt_module_get_current_speed, [:pointer], :int
|
155
|
+
attach_function :openmpt_module_get_current_tempo, [:pointer], :int
|
156
|
+
attach_function :openmpt_module_get_current_order, [:pointer], :int
|
157
|
+
attach_function :openmpt_module_get_current_pattern, [:pointer], :int
|
158
|
+
attach_function :openmpt_module_get_current_row, [:pointer], :int
|
159
|
+
attach_function :openmpt_module_get_current_playing_channels,
|
160
|
+
[:pointer], :int
|
161
|
+
|
162
|
+
# VU meter calls
|
163
|
+
attach_function :openmpt_module_get_current_channel_vu_mono,
|
164
|
+
[:pointer, :int], :float
|
165
|
+
attach_function :openmpt_module_get_current_channel_vu_left,
|
166
|
+
[:pointer, :int], :float
|
167
|
+
attach_function :openmpt_module_get_current_channel_vu_right,
|
168
|
+
[:pointer, :int], :float
|
169
|
+
|
153
170
|
# Read module calls
|
154
171
|
attach_function :openmpt_module_read_mono,
|
155
172
|
[:pointer, :int, :int, :pointer],
|
data/lib/ffi/openmpt/module.rb
CHANGED
@@ -121,6 +121,41 @@ module FFI
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
+
def current_speed
|
125
|
+
openmpt_module_get_current_speed(@mod)
|
126
|
+
end
|
127
|
+
|
128
|
+
def current_tempo
|
129
|
+
openmpt_module_get_current_tempo(@mod)
|
130
|
+
end
|
131
|
+
|
132
|
+
def current_order
|
133
|
+
openmpt_module_get_current_order(@mod)
|
134
|
+
end
|
135
|
+
|
136
|
+
def current_pattern
|
137
|
+
openmpt_module_get_current_pattern(@mod)
|
138
|
+
end
|
139
|
+
|
140
|
+
def current_row
|
141
|
+
openmpt_module_get_current_row(@mod)
|
142
|
+
end
|
143
|
+
|
144
|
+
def current_playing_channels
|
145
|
+
openmpt_module_get_current_playing_channels(@mod)
|
146
|
+
end
|
147
|
+
|
148
|
+
def current_channel_vu_mono(channel)
|
149
|
+
openmpt_module_get_current_channel_vu_mono(@mod, channel)
|
150
|
+
end
|
151
|
+
|
152
|
+
def current_channel_vu_stereo(channel)
|
153
|
+
[
|
154
|
+
openmpt_module_get_current_channel_vu_left(@mod, channel),
|
155
|
+
openmpt_module_get_current_channel_vu_right(@mod, channel)
|
156
|
+
]
|
157
|
+
end
|
158
|
+
|
124
159
|
def metadata_keys
|
125
160
|
ptr = openmpt_module_get_metadata_keys(@mod)
|
126
161
|
ptr.read_string.split(';').map(&:to_sym)
|
data/lib/ffi/openmpt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-openmpt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Haines
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -84,16 +84,30 @@ dependencies:
|
|
84
84
|
name: rubocop
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 0.67.2
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.67.2
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-performance
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.1.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
110
|
+
version: 1.1.0
|
97
111
|
description: libopenmpt is a library to render tracker music (MOD, XM, S3M, IT, MPTM
|
98
112
|
and dozens of other legacy formats) to a PCM audio stream. See https://openmpt.org/
|
99
113
|
for more information.
|
@@ -105,7 +119,7 @@ extra_rdoc_files: []
|
|
105
119
|
files:
|
106
120
|
- ".gitignore"
|
107
121
|
- ".rubocop.yml"
|
108
|
-
- ".
|
122
|
+
- ".rubocop_todo.yml"
|
109
123
|
- ".ruby-gemset"
|
110
124
|
- ".ruby-version"
|
111
125
|
- ".travis.yml"
|