badaix / snapcast

Synchronous multiroom audio player
GNU General Public License v3.0
6.08k stars 451 forks source link

Move 'heavy lifting' to server (from client) #1228

Open oliv3r opened 4 months ago

oliv3r commented 4 months ago

Currently, the server has a fixed config, and the client will just have to comply. E.g. if the server decides a (computationally heavy) codec is used, the client will have to support it. If the client doesn't support a sample rate, the client has to resample.

While this can be the default behavior, it would be nice that if a client doesn't support resampling, the client will request a stream in a specific configuration, and the server will do the resampling. Obviously the server would have to be somewhat smart, to not resample every stream for every client when those are the same settings.

Likewise, if a client only supports ogg or PCM, the client should be able to request a stream in a format it supports.

This would remove some dependency pressure on the client (#1227) and also help with low-resource clients.

SantiagoSotoC commented 3 months ago

Wouldn't it be better for the clients to inform which formats they support and then the user can choose which stream to send to the group that is most optimal. If this only applies to dynamic configurations, by means of the api