\section{KAudio\-Player Class Reference}
\label{classKAudioPlayer}\index{KAudioPlayer@{KAudioPlayer}}
This class provides one-shot-and-forget audio playing.  


{\tt \#include $<$kaudioplayer.h$>$}

Inheritance diagram for KAudio\-Player:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=56pt]{classKAudioPlayer__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KAudio\-Player:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=56pt]{classKAudioPlayer__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf play} ()
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KAudio\-Player} (const {\bf QString} \&filename, {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)
\item 
{\bf $\sim$KAudio\-Player} ()
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static void {\bf play} (const {\bf QString} \&filename)
\end{CompactItemize}


\subsection{Detailed Description}
This class provides one-shot-and-forget audio playing. 

You will never know if what you wanted to play really got played.

It doesn't require linking any special libraries, as it operates over DCOP. In the current implementation, it only indirectly communicates with the a\-Rts soundserver, using knotify as DCOP -$>$ MCOP bridge.

Due to that fact, if you need \char`\"{}fast\char`\"{} response times, more control or feedback, use the MCOP interfaces rather than this.

An example of using this class is:



\footnotesize\begin{verbatim}   KAudioPlayer::play("/var/share/foo.wav");
\end{verbatim}
\normalsize


If you want to use signals \& slots, you can do something like:



\footnotesize\begin{verbatim}   KAudioPlayer player("/var/share/foo.wav");
   connect(&button, SIGNAL(clicked()), &player, SLOT(play()));
\end{verbatim}
\normalsize
 



Definition at line 56 of file kaudioplayer.h.

\subsection{Constructor \& Destructor Documentation}
\index{KAudioPlayer@{KAudio\-Player}!KAudioPlayer@{KAudioPlayer}}
\index{KAudioPlayer@{KAudioPlayer}!KAudioPlayer@{KAudio\-Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAudio\-Player::KAudio\-Player (const {\bf QString} \& {\em filename}, {\bf QObject} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKAudioPlayer_a0}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filename}]Absolute path to the filename of the sound file to play \item[{\em parent}]A parent {\bf QObject} for this KAudio\-Player \item[{\em name}]An internal name for this KAudio\-Player\end{description}
\end{Desc}


Definition at line 33 of file kaudioplayer.cpp.\index{KAudioPlayer@{KAudio\-Player}!~KAudioPlayer@{$\sim$KAudioPlayer}}
\index{~KAudioPlayer@{$\sim$KAudioPlayer}!KAudioPlayer@{KAudio\-Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAudio\-Player::$\sim${\bf KAudio\-Player} ()}\label{classKAudioPlayer_a1}


Destructor. 



Definition at line 39 of file kaudioplayer.cpp.

\subsection{Member Function Documentation}
\index{KAudioPlayer@{KAudio\-Player}!play@{play}}
\index{play@{play}!KAudioPlayer@{KAudio\-Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Player::play (const {\bf QString} \& {\em filename})\hspace{0.3cm}{\tt  [static]}}\label{classKAudioPlayer_e0}


Static play function. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filename}]Absolute path to the filename of the sound file to play. if not absolute, goes off KDEDIR/share/sounds/ (preferred)\end{description}
\end{Desc}


Definition at line 44 of file kaudioplayer.cpp.\index{KAudioPlayer@{KAudio\-Player}!play@{play}}
\index{play@{play}!KAudioPlayer@{KAudio\-Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAudio\-Player::play ()\hspace{0.3cm}{\tt  [slot]}}\label{classKAudioPlayer_i0}


Play function as slot. 

Plays the soundfile given to the constructor.

Definition at line 50 of file kaudioplayer.cpp.

References KNotify\-Client::user\-Event().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kaudioplayer.h\item 
kaudioplayer.cpp\end{CompactItemize}
