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

List:       kde-multimedia
Subject:    Re: Problems with artsflow example
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       2001-04-01 22:58:12
[Download RAW message or body]

   Hi!

On Wed, Mar 28, 2001 at 03:11:21PM -0500, Jeff Tranter wrote:
> The code example 14.3 from KDE 2.0 development uses a Synth_PLAY module,
> which writes directly to the sound card, so it will not work
> if the sound server is running. What changes would be needed
> to make it work with a Synth_AMAN_PLAY module?

Synth_AMAN_PLAY will only work if you create the objects on the server instead
of inside the client. So

   Arts::Synth_FOO foo;

becomes

   Arts::Object obj = server.createObject("Arts::Synth_FOO");
   if(obj.isNull()) arts_fatal("we have a problem");
   Arts::Synth_FOO foo = Arts::DynamicCast(obj);

An alternative would be if somebody completed the cascading style audio
IO we talked about already on the list: we'll need to have a way that aRts
objects can create the sound locally and output it to another aRts server,
such as 

a) an Arts::AudioIOArts driver for the AudioSubSystem
b) an Arts::Synth_ARTS_PLAY thing, that forwards the data to the sound server

whereas b) can be made more efficient/generic than a).

> I also get an error with the example when using a Synth_PLAY module:
> 
> file synth_play_impl.cc: line 184 (void Arts::Synth_PLAY_impl::calculateBlock(long \
> unsigned int)): assertion failed: (format == 8 || format == 16 || format == 17) 

Have a look at what exactly fails. If the code just can't open /dev/dsp because
artsd is running then - well - thats what I would expect. If the code should
be able to open /dev/dsp, then maybe something is wrong with AudioIOOSS (it
should select the bits to 16 or 17 on open, so the assert should not occur).

   Cu... Stefan
-- 
  -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany
     KDE Developer, project infos at http://space.twc.de/~stefan/kde *-         
_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia


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

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