Pachelbel 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/project/Pachelbel.rb +6 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41ce12a2fe7d10ef106f25d3aa00208cc3ca90f3
4
- data.tar.gz: 137fdb486ff502a80578f41b2aa45a10561d57c0
3
+ metadata.gz: dc981169af1c38a8fc37f1637b0015e7d6dc668e
4
+ data.tar.gz: 17631bac320f9f33f5954aae41c67b16c8ec52b3
5
5
  SHA512:
6
- metadata.gz: 56d553630ae4c376b5de4204f3006de643a7cbd2087062d574c40f7bdf8e05596d1a8ecd92dccf51f7b745ddf2b6516599c2803f8caed145c28e220aa4b99c41
7
- data.tar.gz: a20d73abf67f0bcbadd4ac34a6ad0df87c351082e0ed8dcc5abab503379f76965ec0ec795dd0a40cbc5dfef29feb700565faff607e0530b096c63ba0e71f382d
6
+ metadata.gz: 4163fecf2f5678c5fd02c27e35c3768da69bde62400642105b6287a0c7bd86a732a73f33b5ed6376023b03bb1cda7a75800e53661146b7648f43bceba1cd288b
7
+ data.tar.gz: 27bc1612bc04e1227846eed3bd57a4c192e77cd93de0be2270803b81b9af11aa29704c9df0323ef15c8549f6b54ed990e2b6190a07b2537deca37c1f66f491c6
@@ -88,7 +88,8 @@ module Pachelbel
88
88
  def createGain
89
89
  object = GainNode.allocate
90
90
  object._audio_context = self
91
- object._index = run_js('audio_nodes.push( audio_context.createGain() );').to_i - 1
91
+ js_method = UIDevice.currentDevice.systemVersion[0] == '6' ? 'createGainNode' : 'createGain'
92
+ object._index = run_js("audio_nodes.push( audio_context.#{js_method}() );").to_i - 1
92
93
  object
93
94
  end
94
95
  end
@@ -168,11 +169,13 @@ module Pachelbel
168
169
  # API Methods
169
170
 
170
171
  def start(time)
171
- run_js("#{_js_snippet}.noteOn(#{time});")
172
+ js_method = UIDevice.currentDevice.systemVersion[0] == '6' ? 'noteOn' : 'start'
173
+ run_js("#{_js_snippet}.#{js_method}(#{time});")
172
174
  end
173
175
 
174
176
  def stop(time)
175
- run_js("#{_js_snippet}.noteOff(#{time});")
177
+ js_method = UIDevice.currentDevice.systemVersion[0] == '6' ? 'noteOff' : 'stop'
178
+ run_js("#{_js_snippet}.#{js_method}(#{time});")
176
179
  end
177
180
  end
178
181
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Pachelbel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Carey Buglione