Module: DummyAudio

Defined in:
lib/dummy_audio.rb

Overview

Dummy audio backend for CI/testing environments without audio hardware. Has the same interface as the Audio C extension but does nothing.

Class Method Summary collapse

Class Method Details

.duration(clip) ⇒ Object



18
19
20
# File 'lib/dummy_audio.rb', line 18

def self.duration(clip)
  5.0
end

.initObject



8
9
10
# File 'lib/dummy_audio.rb', line 8

def self.init
  nil
end

.load(path) ⇒ Object



12
13
14
15
16
# File 'lib/dummy_audio.rb', line 12

def self.load(path)
  id = @sound_count
  @sound_count += 1
  id
end

.pause(channel) ⇒ Object



30
31
32
# File 'lib/dummy_audio.rb', line 30

def self.pause(channel)
  nil
end

.play(channel, clip) ⇒ Object



22
23
24
# File 'lib/dummy_audio.rb', line 22

def self.play(channel, clip)
  channel
end

.resume(channel) ⇒ Object



34
35
36
# File 'lib/dummy_audio.rb', line 34

def self.resume(channel)
  nil
end

.set_pitch(channel, pitch) ⇒ Object



42
43
44
# File 'lib/dummy_audio.rb', line 42

def self.set_pitch(channel, pitch)
  nil
end

.set_pos(channel, angle, distance) ⇒ Object



46
47
48
# File 'lib/dummy_audio.rb', line 46

def self.set_pos(channel, angle, distance)
  nil
end

.set_volume(channel, volume) ⇒ Object



38
39
40
# File 'lib/dummy_audio.rb', line 38

def self.set_volume(channel, volume)
  nil
end

.stop(channel) ⇒ Object



26
27
28
# File 'lib/dummy_audio.rb', line 26

def self.stop(channel)
  nil
end