diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch) | |
tree | 5ac38a06f3dde268dc7927dc155896926aaf7012 /arts/kde/README | |
download | tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'arts/kde/README')
-rw-r--r-- | arts/kde/README | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arts/kde/README b/arts/kde/README new file mode 100644 index 000000000..2d34f08fd --- /dev/null +++ b/arts/kde/README @@ -0,0 +1,51 @@ +libartskde Introduction +----------------------- + +1. What is libartskde? +libartskde is a simple KDE->aRts wrapper +that allows the developer to use KDE +technology to access aRts. +ie. no need to deal with std::string's anymore +etc.. you can just use QString's or KURL's +to play sound + +2. How to use it to play sounds? +<snip> +1 KArtsDispatcher dispatcher; +2 KArtsServer server; + +3 KURL file = "file:/home/nikoz/test.mp3"; + +4 KPlayObjectFactory factory(server.server()); +5 KPlayObject *playobj = factory.createPlayObject(file, true); + +6 playobj->play(); +<snap> + +Line: +1 Sets up the a KArtsDispatcher +2 Starts a new SoundServerV2 in the running artsd process + +3 Simple test URL to demonstrate the use with KURL + +4 Creates a KPlayObjectFactory, parameter: our SoundServerV2 +5 Gets a KPlayObject from the factory, containing an Arts::PlayObject + created in our running artsd process + Parameters: + KURL url + (specifies the url to be played) + bool createBUS + (specifies wheter to create a Synth_BUS_UPLINK or not, "false" is only interesting if you want to use EffectsStacks etc..., see Noatun) +6 Play the file + +That's it, with 6 LOC a "full" media player :) + +To make the example above compile you will also have to add these #includes: +#include <arts/kartsserver.h> +#include <arts/kartsdispatcher.h> +#include <arts/kplayobject.h> +#include <arts/kplayobjectfactory.h> + +Enjoy... +Nikolas Zimmermann +<wildfox@kde.org> |