Hi, I think everybody agrees that the more possibilities the better. I'm not sure if I read Brandon correctly, but he seems to say that a simple default would be better. I agree with that. Some users like that liquidsoap checks that their files are all in the expected format already, but we can call those power users and ask them to write something less obvious (write playlist.no_conversion instead of playlist).
On Wed, Feb 2, 2011 at 2:38 AM, Romain Beauxis <[email protected]> wrote: > Concerning a practical way to implement the stereo default, couldn't we have a > setting concerning buffers where we choose if we want to have default mappings > ? That would fix all sources using buffers, i.e. request-based and input.http > sources. I don't see why you're talking buffers. Did you mean request-based sources? In any case, that choice can't be done via a setting because it changes the type of sources. For example, we could have: single : (string)->source('*a,'*b,'*c) single_stereo : (string)->source(2,0,0) = fun(s) -> audio_to_stereo(single(s)) single_fixed : (string)->source('#a,'#b,'#c) = fun(s) -> any_to_fixed_audio(single(s)) (Of course, the names would be different, the current "single" would become "single.no_conversion" and the default one would get the simple name "single".) The first one is what we have currently: it tries to decode exactly what you're asking for. If you're encoding stereo, it can only decode stereo audio. It can drop video, though -- because asking for an explicit video dropping operator would be stupidly costly since it'd decode video. The second one produces only stereo but can decode any sort of audio, converting implicitly using the current audio_to_stereo. It'd be enough for most people but wouldn't work with a mono output, as Romain observed. The last one would have an interesting type, general enough to work in almost all situations. The goal is that it implicitly converts audio as needed (doing mono to stereo when you want stereo, stereo to mono when you want mono, etc) and probably not doing anything on other types of content (video and midi). The any_to_fixed_audio would have type source('*a,'*b,'*c)->source('#d,'*b,'*c) and doesn't exist yet. In fact it might be tricky to do, since it could also be asked to convert 5 channels into 1, 5 to 3, 3 to 2... many cases when there's no obvious choice... it might be okay if it does the common cases in a natural way, and we let weird people use a more specific conversion operator explicitly. The last one is not doable yet, but the idea is to use a conversion operator that can Cheers, -- David ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
