Passed
Pull Request — master (#19)
by Matt
02:16 queued 01:04
created

audio.a334000()   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nop 0
1
from time import sleep
2
3
from timed_events_data import get_timed_events
4
5
from PyDMXControl.controllers import uDMXController as Controller
6
7
# Create controller and events
8
dmx = Controller(suppress_dmx_value_warnings=True)
9
10
# Load some fixtures from JSON
11
dmx.json.load_config('json/home.json')
12
13
# Pause/play testing
14
"""
15
from time import sleep
16
17
player.set_volume(0)
18
player.set_volume(1, 5000)
19
player.play("you-will-be-found.mp3")
20
print("playing")
21
sleep(10)
22
player.pause()
23
print("paused")
24
sleep(3)
25
player.unpause()
26
print("unpaused")
27
sleep(5)
28
player.stop()
29
print("stopped")
30
sleep(5)
31
"""
32
33
# Get the timed events (contains the audio)
34
events = get_timed_events(dmx)
35
36
# Play a light show using events to dear evan hansen - you will be found
37
events.run()
38
sleep(15)
39
print(events.data)
40
41
dmx.sleep_till_enter()
42
43
# Close
44
dmx.close()
45