ESD: set format/rate on-the-fly

Howdy all,

	This patch adds support for changing a stream's (or sample's) format
and/or rate on the fly.  The functions are analagous to esd_set_sample_pan
and are used the same way.

	esd_set_stream_format( int esd, int id, esd_format_t fmt );
	esd_set_sample_format( int esd, int id, esd_format_t fmt );
	esd_set_stream_rate( int esd, int id, int rate );
	esd_set_sample_rate( int esd, int id, int rate );

	This should allow things like xmms to not have to create new streams
if they don't want to.  That will, in turn, make it easier for mixer-like
applications to mangle (err... manage) streams.

	I think they work -- I've hacked up xmms to use 'em where possible
instead of opening new streams, but it still seems to open new streams
sometimes, so I can't currently guarantee anything.  I'd suggest testing 'em
before applying them.  Still, it's basically a copy (with minor
maintainability-hacks) of the esd_set_stream_pan code, so verifying the
logic should be simple.

	Now why do I have this crazy sense of deja-vu? :-)

- Bob

PS: I'd like to attack the subscribe_all_info() & related functions, just to
see 'em in... but I'd also like to pass my midterms and graduate, so it's
not likely to happen anytime soon. ;-)

Attachment: esd_set_fmt+rate.diff.gz
Description: Binary data

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]