Still: KAudioPlayer::play()
Joerg Anders
j.anders at informatik.tu-chemnitz.de
Wed Mar 26 09:15:41 GMT 2003
Hi all!
Yesterday I asked for a possibility to predict whether
the KAudioPlayer::play() will play immediately or whether
it suspends operation because the user blocks /dev/dsp
with some other process.
Now I'm very close to a solution. I get the sound
server and ask it whether it is suspended.
But unfortunately during sound server recognition
my program crashes. (Perhaps it has to do with my
KDE-3.0.1a version ?)
At:
http://rnvs.informatik.tu-chemnitz.de/kartstest/servertest.html
there is a very simple test program. It's central code implements the mouse click
event:
virtual void mousePressEvent ( QMouseEvent * e ) {
printf("Pos 1\n"); fflush(stdout);
KArtsServer *kartsserver = new KArtsServer();
printf("Pos 2, kartsserver = 0x%x\n", kartsserver); fflush(stdout);
kartsserver->server();
printf("Pos 3\n"); fflush(stdout);
}
If you compile this (a makefile is also supplied) and run and click with
mouse the result is:
Pos 1
Pos 2, kartsserver = 0x80ae720
and gdb says:
$ gdb servertest
(gdb) run0x41420cc9 in Arts::Dispatcher::stringToObjectReference ()
from /usr/kde/3.1/lib/libmcop.so.1
(gdb) where
#0 0x41420cc9 in Arts::Dispatcher::stringToObjectReference ()
from /usr/kde/3.1/lib/libmcop.so.1
#1 0x4101d93b in Arts::SoundServerV2_base::_fromString ()
from /usr/kde/3.1/lib/libsoundserver_idl.so.1
#2 0x402614a0 in KArtsServer::server () from /usr/kde/3.1/lib/libartskde.so.1
#3 0x0804efa5 in MyDialog::mousePressEvent (this=0x80af760, e=0xbfffefc0)
at servertest.cpp:18
#4 0x4063edb6 in QWidget::event () from /usr/qt/3/lib/libqt-mt.so.3
....
The same happens if you change:
KArtsServer kartsserver;
kartsserver.server();
Does anybody know the reason why ?
--
J.Anders, Chemnitz, GERMANY (ja at informatik.tu-chemnitz.de)
More information about the kde-multimedia
mailing list