The problem is like this:
If an announcement is already playing and another one comes without a volume value there is no sound.
If an announcement is already playing and another one comes with a volume values there is no sound but when the last radio station playing comes back then the volume stays at the value of the second announcement.
The implementation of the announcement is not forseen to queue multiple announcements.
what i dont understant in the ctrl.py there is a comment wich should be implemented
# wait for the announcement to be done and switch back to the previous state
# TODO: what is the longest announcement we should accept?
stream_inst = self.streams[stream.id]
while True:
time.sleep(0.1)
if stream_inst.state in ['stopped', 'disconnected']:
break
another in the streams.py
def wait_on_proc(self):
""" Wait for the vlc process to finish """
if self.proc is not None:
self.proc.wait() # TODO: add a time here
else:
time.sleep(0.3) # handles mock case
self.state = 'stopped' # notify that the audio is done playing