[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Audio Control schema changes
- Subject: Re: Audio Control schema changes
- From: Michael McSharry
- Date: Sat, 14 Feb 2004 18:44:00 +0000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<DIV><FONT face="Arial" size="2">I
generally agree with information returned in block format, but at the same
time consideration should be given to low bandwith interfaces as well as
the general proliferation where the "state" of all providers is
clogging up the network. When a query is made it should be
possible to query either a particular key or a group. This will
allow the optimum level of traffic as determined by the unit that is in
need of the information.</FONT></DIV>
<DIV><FONT face="Arial"
size="2"></FONT> </DIV>
<DIV><FONT face="Arial" size="2">Using the
example</FONT></DIV>
<DIV><FONT face="Arial"
size="2"></FONT> </DIV>
<DIV><FONT face="Courier
New">[Request]Class=xAP-Audio.QueryPlaylist.Query{
Query=[Track List Title Artist Album Path Duration Index Tracks
Genre] Index="index in
playlist"}[Response - where
Query=Track]Class=xAP-Audio.Playlist.InfoTrack.Info{
Title="title"
Artist="artist"
Album="album" Path="path to
current track" Duration="title
duration" Index="playlist
index" Tracks="number of tracks in
the current playlist"
Genre="genre"}</FONT></DIV>
<DIV><FONT face="Courier
New"></FONT> </DIV>
<DIV><FONT face="Courier New">[Response - where
Query=Artist]Class=xAP-Audio.Playlist.InfoArtist.Info{
Artist="artist"}</FONT></DIV>
<DIV></DIV>
<BLOCKQUOTE>
<DIV>----- Original Message ----- </DIV>
<DIV><B>From:</B> <A title="lists@xxxxxxx"
href="mailto:lists@xxxxxxx">Stuart
Booth</A> </DIV>
<DIV><B>To:</B> <A
title="xAP_developer@xxxxxxx" href="mailto:xAP_developer@xxxxxxx">xAP_developer@xxxxxxx</A>
</DIV>
<DIV><B>Sent:</B> Saturday, February 14, 2004 10:08
AM</DIV>
<DIV><B>Subject:</B> Re: [xAP_developer] Audio Control
schema changes</DIV>
<DIV></DIV><TT>[ Oops, this got long! ]In the current
audio control schema as published, audio items such asVolume, Balance etc
are queried individually. So to get all theinformation you have to
send/receive several messages. The sampleapplies for details on the current
playlist track where even morerequests are required. A bit nasty
really!Edward suggested combining these into one query fetches all
relevantdata message. For
example:Class=xAP-Audio.QueryAudio.Query{}Audio.Info{
Volume=
Balance= Bass=
Treble=}This is a great plan in general I think. However, it does
meanAudio.Info is a 'kitchen sink' block where the possible set of
valuescould be quite wide ranging. For example, the Audio settings that
canbe configured are:Class=xAP-Audio.Audio[.Event]Audio.Mute{Mute=[On Off
Toggle]}Audio.Mixer{Volume=[0...100 +nn
-nn] -
-- optionalBalance=[-100...0...+100 +nn
-nn] ---
optionalBass=[0...100 +nn
-nn] ---
optionalTreble=[0...100 +nn
-nn] ---
optional}Audio.SourceSelect{ Input=[name]}We
could extend Audio.Info whenever the audio control schema ischanged and
requires it, such as the example
below:Class=xAP-Audio.QueryAudio.Query{}Audio.Info{
Volume=
Balance= Bass=
Treble= Mute=
Input=}Using Audio.Info you can see that we need to pack everything into
theone block, and hence it doesn't implicitly support future
enhancements(such as the recently added Audio.SourceSelect) so well:- there
might be a field name clash in future.- it might get rather large over
time.- the condi
tions where certain values are valid may get overcomplicated.In some cases
a compound block containing all information makes anawful lot of sense,
such as Track.Info describing the current playlistsong.I was wondering
though - since there is an event message sent out whensomething changes, it
seems we should reuse a similarstyle/name/content for the response message
to the query, and reusethe periodic "xAP-Audio.[Category].Info"
messages for the responseinformation. This can reuse a lot of code on both
sides and issupported in some respects by the Exstreamer already..Info
blocks are sent periodically with state UNchanged information..Event block
on the other hand are sent only when a state changes.This has the effect of
removing the response block from the Queryclass in some cases at least.So
how about:Class=xAP-Audio.QueryAudio.Query{
Query=[ Mute Mixer SourceSelect ]}[Other queryable items such as Playlist
and Track omitted for brevity]As an example, examine the fo
llowing. I have annotated the request andresponse messages as you can
see.[Request]Class=xAP-Audio.QueryAudio.Query{
Query=Mixer}[Response]Class=xAP-Audio.Audio.InfoAudio.Mixer{Volume=Balance=Bass=Treble=}and
also...[Request]Class=xAP-Audio.QueryAudio.Query{
Query=SourceSelect}[Response]Class=xAP-Audio.Audio.InfoAudio.SourceSelect{
Input=[name]}This does require processing of the Query line inside the
initialquery block. But this is consistent with Playlist.Query. Some
don'teven have any query block
content:[Request]Class=xAP-Audio.QueryTransport.Query{}[Response - a
compound block in this
case]Class=xAP-Audio.Transport.InfoTransport.Info{
Mode=[Play Pause Stop] Sleep=[Yes
No] Power=[On
Off]
Length="Length"
Position="Position" &am
p;nbsp; Index="playlist index"
Decoder="encoding:bit-rate:sample-rate"}and[Request]Class=xAP-Audio.QueryPlaylist.Query{
Query=[Track List] Index="index in
playlist"}[Response - where
Query=Track]Class=xAP-Audio.Playlist.InfoTrack.Info{
Title="title"
Artist="artist"
Album="album" Path="path to
current track" Duration="title
duration" Index="playlist
index" Tracks="number of tracks in
the current playlist"
Genre="genre"}or[Response - where
Query=List]Class=xAP-Audio.Playlist.InfoPlaylist.Info{
Tracks="length of play list" &nb
sp; Index="index of current
track" Shuffle=[On
Off] Repeat=[Stop Track Playlist]}It has
the advantage of a query mechanism falling out of an existinginformational
broadcast system and can be easily extended.I did wonder about changing the
query from:Class=xAP-Audio.QueryAudio.Query{
Query=[ Mute Mixer SourceSelect ... ]}Where the Query values are fixed,
making this free-text and specifyingthe block name that we're interested
in. Although this does mean theblocks have to be kept unique unless the
class name is specified tooe.g.:Query{
Query=xAP-Audio.Audio[.Info?]:Audio.Mixer}Hopefully all these changes will
fix a few flaws in the schema whichhas been fairly static for almost a year
now.SPS - congrats for reading this far! ;-)-- Stuart Booth
<stuart@xxxxxxx>xAPFramework.net - a xAP software development
framework for .net<A href="http://www.xapautomation.org/">http://www.xapautomation.org/</A>
<A href="http://www.xapframework.net/">http://www.xapframework.net/</A></TT>
xAP_Development Main Index |
xAP_Development Thread Index |
xAP_Development Home |
Archives Home
|