Phonon Sample Cache
Colin Guthrie
gmane at colin.guthr.ie
Sat Aug 27 16:29:05 BST 2011
'Twas brillig, and Harald Sitter at 27/08/11 14:50 did gyre and gimble:
> On Sat, Aug 27, 2011 at 2:56 PM, Colin Guthrie <gmane at colin.guthr.ie> wrote:
>> 'Twas brillig, and Harald Sitter at 27/08/11 10:12 did gyre and gimble:
>>> On Fri, Aug 26, 2011 at 6:37 PM, Trever Fischer
>>>> A quick discussion with Colin suggests to me that some further design
>>>> refinement is needed. To illustrate, everything should be handled with
>>>> libcanberra on Linux because reinventing the wheel sucks. That raises one
>>>> minor problem: using libcanberra on linux, we'd only need the correct
>>>> sample name, such as "new-message-im". For other desktops, we would need
>>>> the path to the sound or at least a place to look for the sound.
>>>>
>>>> One more note: This is in no way intended to replace KNotify or to create
>>>> a cross-desktop notification system. The primary intent is for something
>>>> such as the meego dialer to quickly play a DTMF tone the instant the
>>>> keypad button is pressed, or KGoldRunner to not be laggy and cut off the
>>>> sounds. libcanberra supports game sounds to be themed, so playing nice
>>>> with that is the reason for sound theme support.
>>>
>>> One thing that puzzled me the the other day when thinking about sample caches.
>>> How exactly would this work with libcanberra on Linux?
>>> I mean, what is used on Windows and OSX seeing that libcanberra only
>>> does GStreamer and thelennart only cares about Linux, and only that?
>>> And where/how is one single API provided to KDE apps so that they do
>>> not have to mind crossplatformness?
>>
>> libcanberra does pulse, alsa, gstreamer and OSS. The plan would be to
>> use pulse by default on most linux systems and write an additional
>> phonon backend for canberra for those users who do not want to use pulse
>> (which is an reducing minority but an annoying vocal one, so needs to be
>> supported). If written, this phonon backend would be committed upstream.
>
> So one would use Phonon to use libcanberra to use Phonon?
One would use the Phonon Sample Player to use libcanberra to use the
Phonon Media Player.
Just because the two different bits are both part of "Phonon" over all
doesn't mean that they are equiv!
And in most linux installs it would actually be: Phonon Sample Player ->
libcanberra -> PulseAudio.
(thus getting sample caching and positional sounds etc.)
>> That said, the only drawback to using alsa rather than phonon backend in
>> canberra would be the device preferences as shown by systemsettings. I
>> don't really care that much about linux systems which don't use PA, so
>> the fact that when PA is not used these settings only affect a very
>> small subset of applications is something that makes them IMO of limited
>> usefulness anyway and thus I'm not super bothered that game sound events
>> do not go through these preferences in this case... (harsh I know!). But
>> this would of course be solved with a phonon backend in canberra :)
>
> One can not set the output device for libcanberra (consequently ALSA)?
> That sounds a bit rubbish TBH.
You can set it but the problem would be the GUI. As I said, that's only
if we did not write a Phonon backend on libcanberra and just use the
ALSA one.
Obviously the ASLA output honours the .asoundrc file but this is not
hooked up the the systemsettings GUI. This is the point I was making.
That using systemsettings would not work well (IMO it doesn't work that
well without PA anyway, so this isn't much different)
> Supposedly we can all agree that non-PA *nix setups are mostly
> negligible, but if an application uses Phonon then it must be able to
> expect a certain amount of integration. Particularly WRT the default
> device used, so being able to set the default device on libcanberra
> seems like must-have feature.
I think I perhaps confused the issue. I hope the explanation above
clarifies things.
Cheers
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the kde-multimedia
mailing list