PlayObject-questions

thomas.friedrichsmeier at ruhr-uni-bochum.de thomas.friedrichsmeier at ruhr-uni-bochum.de
Sat Jul 27 23:58:06 BST 2002


Hi!

Thanks for your detailed reply.

> So adding a "standarized" piece of loop code into this will not be possible.

Well, I have extended the WavPlayObject to do what I want it to, and so I guess,
I'll just live with the limitation of only being able to play wavs for now.

> Note that GSL is "not-entierly-done-yet(tm)", but I think this is the "central
> place" you are looking for to centralize decoding of all audio formats.

That indeed was, what I was looking for, and it's good to hear, that changing 
speed and looping is already integrated into it - that's all I need. Of course, 
not being an arts developer, but rather writing a game supposed to run today 
on a "normal" KDE-distribution, "not-entierly-done-yet(tm)" is not really an 
option. But it's good to know there is a clean solution coming up, that I can 
switch to once it's finished.

> PitchablePlayObject is - as PlayObject - an interface. So the way to use it is
> this:
> 
>  * obtain a PlayObject
>  * cast it into a PitchablePlayObject
> 
>    Arts::PlayObject po = ...;
>    Arts::PitchablePlayObject ppo = Arts::DynamicCast(po);
> 
>  * set the speed attribute to the relative playing speed
> 
>    if(!ppo.isNull()) /* cast succeeded */
>      ppo.speed(2.0); /* play twice as fast */

I see, but you still need the PlayObject po in order to start and stop the playback, right?
I got confused with PitchablePlayObject only having the speed ()-member 
function.

> If you want to _ensure_ you get a PlayObject which is pitchable upon creation,
> you will need to do the TraderQuery for the object yourself. There you can say:
> I would like to have a "PlayObject which can play mp3s and implements the
> interface Arts::PitchablePlayObject".

Probably this is rather not the way to do it, but I ensure to get my extended WavPlayObject by using
server.createObject ("EXT_WavPlayObject") and then use loadMedia () on it. 
Of course that again means, that I can only use wavs, but it works.

> Implement the interface in those PlayObjects that do support looping. You
> will have to do one-by-one, but given that the GSLPlayObject will support
> {wav,mp3,ogg}, adding support to this single PlayObject might be sufficient.

That of course means that I won't do so for now... (see above)

> I see that documentation is a big weakness of aRts. I can only encourage you to
> write as many mails as you need to write, either on the list or to me, until you
> know the things you need to know. I know that the approach doesn't scale very
> well, but well, if you want to, you might also work on the documentation after
> you have understood something.

Feeling a bit less confused now, acutally I might one of those days start writing a short
documentation/tutorial dealing at least with those problems (and solutions) 
that I have run into - if I will find the time...
I should remark, that indeed your e-mail support is really good. Thanks a lot!

Thomas



More information about the kde-multimedia mailing list