Hi Andy,

On Freitag, 10. April 2020, 12:58:22 CEST andy pugh wrote:
> Imagine that you have a smart speaker and a phone app that lets you
> change the volume, but that the volume must never be allowed to change
> during a song.

Strange, but nice sample ;)

> The app can make sure that the music plays continuously by buffering
> several seconds of music, but it would have to pause between tracks to
> see if there had been a request to change the volume. The app would
> need to stop buffering music at a track-break to give the system an
> opportunity to check for a volume change.

Well, here I tick way different to design a system.

Play music is a different channel than record user commands (from microphone). 
Buffering music could be a background task and a change to volume is a system-
command waiting in a queue.
If during playtime of a song a command to change volume arrives, it is held by 
the queue and on triggering "play next song" the player checks the queue. 
If a command for altering volume is found, system alters volume and starts 
with next song, which has already filled buffers ...
No need to stop buffering or anything else.
That could work for fade in / fade out too, without any changes.
Output acts completely independant of the command channel.
So decoupling modules increases freedom for system design and different 
developers could dedicate on a single volume without having to care about 
other modules.

Well, just my thoughts :)

Reinhard






_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to