[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    Re: LibKMid - A MIDI library
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       2000-01-18 1:25:51
[Download RAW message or body]

   Hi!

On Mon, Jan 17, 2000 at 08:12:27PM +0100, Antonio Larrosa wrote:
> Where should I commit it on CVS ? The intuitive place is kdelibs, but
> not even aRts is there (it's in kdemultimedia), so perhaps libkmid should
> be another main directory on kdemultimedia ? 
> Otoh, I hope to see every game from kdegames gets background music soon :) 
> but that would create a dependency from kdegames on kdemultimedia, is it
> right ?
> 
> The library doesn't link against Qt nor any of the kdelibs, so it may go
> into kdesupport, but if I'm not wrong, kdesupport is for 3rd made software
> and this has been done by us .
> 
> I don't know where to commit it to . Ideas ?

If we intend to take it seriously with "KDE2 will offer significant
improvements in the multimedia section", we have to put our stuff into
kdelibs. Otherwise, either nobody will rely on it, or everything (even
kdebase) will depend on kdemultimedia. So kdelibs is the right place, IMHO.

A short answer for aRts is, that it needs to be moved to kdelibs, too. Most
of it anyway. I'm still thinking what and how. But at least mcop should be
accessible. Your interface pretty much looks like the SimpleSoundServer
interface, by the way. Perhaps we could make playing wavs and midis
possible with the same API?

interface SimpleSoundServer { // is something like
  long play(string filename);
  void stop(long id);
};

SimpleSoundServer::_fromString("global:Arts_SimpleSoundServer") is expected
to give you such a thing.

If we could integrate MCOP in a similar way into KApplication like DCOP, it
could startup itself on demand and terminate itself with the KApplication
instance, so no need for the init and destroy calls.

Basically, all it would need would be a void pointer in KApplication, which
would point to an MCOP Dispatcher or to nothing.


The only thing that comes to my mind that is currently unclear is termination.

What is supposed to happen if you do server->play("foo.mid"), and you wait
an hour?

  -> for games: loop it all that time
  -> semantic right now: play it once

What is supposed to happen if you do a server->play("foo.mid") and your
process exits?

  -> for games: stop it at once
  -> semantic right now: play it once

The looping issue could be fixed easily adding another boolean. The process
exit behaviour is a bit different. Basically, the SimpleSoundServer class
will not even "see" when the process exits. It could be fixed similar to
the kmedia2 API (e.g. returning an object instead of a long), but then
you loose something like typing

$ artsplay foo.mid

and having that return at once (though it is a question how you would then
get rid of that file if you wanted to, especially if you have looping
enabled ;)).


Well, what do you think? It would be nice to have SimpleSoundServer playing
mp3's, mid's, wav's, which all may make sense as game "music" (I remember
having an Amiga pinball game, which just looped an 8 second sample as music,
which was quite okay, too ;).

   Cu... Stefan
-- 
  -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany
     KDE Developer, project infos at http://space.twc.de/~stefan/kde *-

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic