[crossfire] Background music

Mark Wedel mwedel at sonic.net
Sun Apr 22 13:34:38 CDT 2007


Nicolas Weeger wrote:
> Hello.
> 
> I just added a 'background_music' field to maps.
> 
> 'sound' setup has been changed. If client sends '2' as value (instead of 1), 
> support for background music is enabled.
> 
> When player enters a map, background music name is sent, or 'NONE' if nothing 
> is defined for the map.

  I almost wonder if it is worthwhile for the server to know/care about the 
client sound settings - it keeps the server simpler if it doesn't.  The only 
reason it makes any sense is some bandwidth savings, but the savings for this, 
especially for the backgrounds ones on the map, is pretty trivial.

> 
> There is still no client-side support, though. Not sure of the library to use 
> for that (SDL sound, maybe?)

  A fair amount depends on the format we use for the sound files.  For the 
current unix client, I think the current sound program could be used pretty 
easily with a few minor modifications (basically, it just keeps copying in the 
sound data to the sound card).

> 
> background_music value is a free string, so it's up to us to decide what to 
> use.
> 
> It could be 'style:xxx' to specify a generic style, the client choosing one 
> randomly from its curpus. And 'specific:xxx' to signify a particular 
> background one, for special maps.

  That sounds good.

> 



More information about the crossfire mailing list