Banned
|
Ok thank you.
I understand there is no replacement for artsplay in KDE4. It is more by curiosity to understand how Dolphin is able to preview sound files without any basic player, just directly talking to libraries. As I am not a developer, aplay command from alsa-utils will do the trick. Thanks. But very last question.... Thunderbird is able to play new coming mail sounds. Thunderbird is not a KDE4 program, and nothing special has been develop to integrate Thunderbird in KDE4. How Thunderbird can guess how KDE4 is now playing sounds ? |
Registered Member
|
Thunderbird probably play sound using ALSA.
Phonon uses an engine (currently Xine or GStreamer) and this engine uses diferent methods to play sounds: ALSA, OSS, PulseAudio, etc....
Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.
|
Banned
|
"Thunderbird probably play sound using ALSA."
aplay is part of alsa-utils package which is optional. Thunderbird plays sounds without this optional package. Then, same mystery as kde4 sound preview command. How programs play sounds directly talking to librairies ? One needs to be a developer to understand the mechanism. I will live without understanding, but the most important: it works fine ! Thanks. |
Administrator
|
Just an extra piece of information: "aplay" likely uses the very same libraries that Phonon and Thunderbird use to play sound. A library is just a unit of precompiled code with standard interfaces ( header files ).
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
KDE Developer
|
It is actually not that difficult to understand. I'll try to explain: To play a sound file, an application has to read the sound data from the file. The sound data is most likely encoded, e.g. mp3 or ogg vorbis, so it has to be passed to a decoder. After that it can be passed to a sound device, which will then pass it to the audio hardware. A player program like aplay does all this on its own, a KDE application like Dolphin just passes the file name to the KDE libraries (in this case Phonon) and it will then do the reading and forwarding of the data. So all sound playing applications to some of these steps on their own, at some point their data ending up in the same destination. It is not important if one application knows how another application does any of these steps, they do it independently from each other. Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
I have written this little script to play a sound using Phonon.
Hope you like it.
|
Administrator
|
@eordano: Some users may definitely find this helpful. You are welcome to post it in the Tutorials & Tips section of the Forum.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Okey, will do. I'm glad you found it interesting.
|
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan