rsudp.c_alertsound
(play sound)¶
-
class
rsudp.c_alertsound.
AlertSound
(testing=False, soundloc=False, q=False)¶ A consumer class that plays an alert sound when an
ALARM
message arrives on the queue.rsudp.c_alertsound.AlertSound.sound
is a pydub.AudioSegment object and is passed from the client.Parameters: - sta (bool or pydub.AudioSegment) – short term average (STA) duration in seconds.
- q (queue.Queue) – queue of data and messages sent by
rsudp.c_consumer.Consumer
.
-
run
()¶ Reads data from the queue and plays self.sound if it sees an
ALARM
message. Quits if it sees aTERM
message.