Module: Earworm

Defined in:
lib/earworm.rb,
lib/earworm/puid.rb,
lib/earworm/track.rb,
lib/earworm/client.rb,
lib/earworm/fingerprint.rb

Defined Under Namespace

Classes: Client, Fingerprint, PUID, Track

Constant Summary collapse

VERSION =
'0.0.2'
URL =
'http://ofa.musicdns.org/ofa/1/track'

Class Method Summary collapse

Class Method Details

.ofa_versionObject



16
17
18
19
20
21
22
23
24
25
# File 'lib/earworm.rb', line 16

def ofa_version
  major = DL.malloc(DL.sizeof('I'))
  minor = DL.malloc(DL.sizeof('I'))
  rev = DL.malloc(DL.sizeof('I'))
  major.struct!('I', 'val')
  minor.struct!('I', 'val')
  rev.struct!('I', 'val')
  EarwormLib.ofa_get_version(major, minor, rev)
  "#{major['val']}.#{minor['val']}.#{rev['val']}"
end