2 return s
is None or len(s
) is 0 or s
.isspace()
5 """Provides an interface for the program to produce audio output.
6 Implementations should subclass this and do whatever is needed for their
7 intended architecture."""
10 """button_callback is called with True to set the playpause button to
11 active (pushed in with pause showing) and with False to set it to
12 inactive (pushed out with play showing)"""
15 self
.status
= self
.Status()
18 """Return a string to use as the label for the current playing song."""
19 raise NotImplementedError()
22 raise NotImplementedError()
25 raise NotImplementedError()
28 """Stop playing and set the current position to status.begin."""
29 raise NotImplementedError()
32 """Load status.filename to prepare for playback."""
33 raise NotImplementedError()
35 def check_status(self
):
36 """Check internal status struct and set timer for looper if needed."""
37 raise NotImplementedError()
41 """Are we currently playing?"""
42 raise NotImplementedError()
46 """Are we currently paused?"""
47 raise NotImplementedError()
51 """Get the current position."""
52 raise NotImplementedError()
56 """Get the length of the current song."""
57 raise NotImplementedError()
60 """Struct class to hold the filename and start and end positions."""
63 self
.begin
= self
.end
= 0
65 def _get_interval(self
):
66 return self
.begin
, self
.end
68 def _set_interval(self
, interval
):
69 self
.begin
, self
.end
= interval
71 interval
= property(_get_interval
, _set_interval
)