32#include <kartsdispatcher.h>
33#include <kplayobjectfactory.h>
34#include <soundserver.h>
39#include "KPrSoundPlayer.h"
43class KPresenterSoundPlayerPrivate {
47 KPresenterSoundPlayerPrivate( TQString fileName ) : fileName( fileName ) {};
50 KArtsDispatcher m_dispatche;
51 Arts::SoundServerV2 m_soundServer;
52 KPlayObjectFactory *m_factory;
53 KPlayObject *m_player;
57KPrSoundPlayer::KPrSoundPlayer( const TQString &fileName, TQObject *parent, const char *name )
58 : TQObject( parent, name )
60 d = new KPresenterSoundPlayerPrivate( fileName );
63 d->m_soundServer = Arts::Reference( "global:Arts_SoundServerV2" );
64 d->m_factory = new KPlayObjectFactory( d->m_soundServer );
69KPrSoundPlayer::~KPrSoundPlayer()
78void KPrSoundPlayer::play( const TQString &fileName )
80 KPrSoundPlayer sp( fileName );
84void KPrSoundPlayer::stop()
92void KPrSoundPlayer::play()
95 if ( d->m_soundServer.isNull() )
100 d->m_player = d->m_factory->createPlayObject( d->fileName, true );
102 if ( d->m_player->object().isNull() )
110#include "KPrSoundPlayer.moc"
|