[sip-comm-issues] Bugs in AudioNotificationService and AudionNotifierServiceImpl ??

Hofer Thomas t.hofer at liwest.at
Wed Aug 29 11:33:05 CEST 2007


Hi!

I probably found a bug (two bugs) in the audio-notification-classes. I
attached my solutions, however, I am not sure, if I just used it the
wrong way.

What I wanted to do, is change the ring tone. Therefore I used the
notification service:

 

 

        File f = new File("d:\\applause.wav"); //just for testing
purpose

 

        // Register incoming message notifications.

        notificationService.removeEventNotification("IncomingCall");

        notificationService.registerNotificationForEvent("IncomingCall",

                NotificationService.ACTION_SOUND,

                f.toURI().toString(),

                null);

 

this does not work for two reasons:

net.java.sip.communicator.impl.gui.main.call.CallManager

 

in line 506:

        NotificationManager.fireNotification(

            Sounds.INCOMING_CALL,

            null,

            "Incoming call recived from: "

                + sourceCall.getCallParticipants().next());

 

Should be

       NotificationManager.fireNotification(

                NotificationManager.INCOMING_CALL,

            null,

            "Incoming call recived from: "

                + sourceCall.getCallParticipants().next());

 

 And in the AudioNotifierServiceImpl

               URL url = AudioNotifierServiceImpl.class.getClassLoader()

                    .getResource(uri);

 

                audioClip = new SCAudioClipImpl(url, this);

 

                audioClips.put(uri, audioClip);

only can deal with resources stored in bundles, no chance to take a
local file. The next view lines of code help and overcome this issue.
However, I think in this case, not a string shall be passed, but already
an URL. What do you think?

                URL url =
AudioNotifierServiceImpl.class.getClassLoader()

                        .getResource(uri);

                if (url == null) {

                    // not found by the classloader! perhaps it's a
local file

                    try {

                        url = new URL(uri);

                    } catch (MalformedURLException e) {

                    }

                }

 

And furthermore, I told the issue, that calling tones do not stop when
the other party rejects or accepts a call. Shouldn't be somewhere the
stop() method of the SCAudioClip objet in the SoubndNotificationHanlder
called? E.g. in stop?

 

Regards, thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jitsi.org/pipermail/issues/attachments/20070829/4a7b6ea8/attachment.html>


More information about the issues mailing list