Fwd: Re: Arts::ModplugPlayObject

Stanislav Karchebny berkus at users.sourceforge.net
Thu Jun 5 10:57:04 BST 2003


**Please, CC: me as im not on the list (yet?).

----------  Original message  ----------

I was able to put kdenonbeta/arts/modplug back to life with a little bit of 
tweaking.
Then I found out that it plays correctly only at 44100Hz (the modplug 
CSoundFile is initialized with constant).

So, I tried to get to the artsd properties by using Arts::SoundServerV2 
interface.

here's the snippet:

---cut---
    Arts::Dispatcher dispatcher; // I dunno why this is needed, but let it be 
for now...
    Arts::SoundServerV2 server(Arts::Reference("global:Arts_SoundServer"));
---cut---

This was copied from artsshell.cc, so apparently should work.

Then i do this:

---cut---
if (server.isNull()) {
        // fallback to defaults
        freq = 44100;
} else {
        freq = server.samplingRate();
}
---cut---

For some reason the whole thing doesn't work (noatun doesn't start, no 
messages output). Before I go deep into "cody trip", can anyone tell me if 
I'm doing something extremely wrong?


----------  Arnold's response  ----------

You should ask this on kde-multimedia@ :-)

On Wednesday 04 June 2003 07:02, Stanislav Karchebny wrote:
> ---cut---
>     Arts::Dispatcher dispatcher; // I dunno why this is needed, but let it
> be for now...

IMHO The dispatcher is the one who brings the sound from one object to the 
other. So its definitly needed in every programm which uses sound...

>     Arts::SoundServerV2 server(Arts::Reference("global:Arts_SoundServer"));

Here you need a "global:Arts_SoundServerV2". The normal Soundserver doesn't 
have a samplingRate(). I believe this is your fault...

> ---cut---
> ---cut---
> if (server.isNull()) {
>       // fallback to defaults
>       freq = 44100;
> } else {
>       freq = server.samplingRate();
> }
> ---cut---

You are setting the frequency to a default-value if no server is found? And 
then you expect sound to come while no server is found???


----------  My response to Arnold's response  ----------

Subject: Re: Arts::ModplugPlayObject
Date: 4 Июнь 2003 19:07
From: Stanislav Karchebny <berkus at users.sourceforge.net>
To: kde-devel at kde.org

В сообщении от 4 Июнь 2003 16:49 Arnold Krille написал(a):
> You should ask this on kde-multimedia@ :-)

Ohh.. ic. May i continue this one here?

> > if (server.isNull()) {
> > 	// fallback to defaults
> > 	freq = 44100;
> > } else {
> > 	freq = server.samplingRate();
> > }
> > ---cut---
>
> You are setting the frequency to a default-value if no server is found? And
> then you expect sound to come while no server is found???

Well, it should found the server, if not it just won't produce any sound.  I
see no harm here. So from your pov, this code looks correct wrt finding
Artsd?


--- and finally my question continued ----

>>     Arts::SoundServerV2 server(Arts::Reference("global:Arts_SoundServer"));

>Here you need a "global:Arts_SoundServerV2". The normal Soundserver doesn't 
>have a samplingRate(). I believe this is your fault...


I tried SoundServerV2 too. It didn't work neither. Any suggestions on how to 
debug it/make it work?

-- 
keep in touch. berk. -- http://odin-os.sf.net -- http://nasm.sf.net



More information about the kde-multimedia mailing list