What happened to "someBuffer"? (was Phonon Sample Cache)

Ian Monroe ian at monroe.nu
Tue Aug 30 07:54:35 BST 2011


On Tue, Aug 30, 2011 at 05:36, Ian Wadham <iandw.au at gmail.com> wrote:
>
> On 28/08/2011, at 12:48 PM, Trever Fischer wrote:
>> Back on topic here, I'm not entirely sure if we should do any kind of theming
>> at all. I've been thinking a bit about the problem today, and it might just be
>> in everyone's best interest for the sample cache to simply play files and not
>> handle any theming or anything. Using libcanberra to handle this in libphonon
>> (instead of the backends themselves) would simply be a convienence for us
>> since all the low latency bits are already handled.
>
> In the Qt 4.7 doco for Phonon::MediaSource, the Detailed Description suggests
> that you can present Phonon with a QBuffer (descended from QByteArray) and
> say, "Here, play this."  I cannot find the current KDE Phonon doco, but AFAICR
> it has always said the same thing, since several years ago.  The problem for
> me has always been, "How do you get a sound sample into the buffer?".  See:
>
>   MediaObject m;
>   QString fileName("/home/foo/bar.ogg");
>   QUrl url("http://www.example.com/stream.mp3");
>   QBuffer *someBuffer;
>   m.setCurrentSource(fileName);
>   m.setCurrentSource(url);
>   m.setCurrentSource(someBuffer);
>   m.setCurrentSource(Phonon::Cd);
>
> If one could easily set up an in-memory MediaSource, wouldn't that solve the
> problem, without bringing in extra libraries, dependencies, build problems, etc?

It's for decoded data afaik. So if the answer to the question "where
do I get this data?" isn't obvious, then using
setCurrentSource(QBuffer) isn't for you.

Ian



More information about the kde-multimedia mailing list