kttsd Library API Documentation

testplayer.h

00001 /***************************************************** vim:set ts=4 sw=4 sts=4:
00002   Player Object for playing synthesized audio files.  Plays them
00003   synchronously.
00004   -------------------
00005   Copyright : (C) 2004 Gary Cramblitt
00006   -------------------
00007   Original author: Gary Cramblitt <garycramblitt@comcast.net>
00008   Current Maintainer: Gary Cramblitt <garycramblitt@comcast.net>
00009  ******************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; version 2 of the License.               *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 #ifndef _TESTPLAYER_H_
00020 #define _TESTPLAYER_H_
00021 
00022 class Player;
00023 class Stretcher;
00024 
00025 // TODO: Make this work asynchronously.
00026 
00027 class TestPlayer : public QObject{
00028     public:
00034         TestPlayer(QObject *parent = 0, const char *name = 0,
00035             const int playerOption = 0, const float audioStretchFactor = 1.0,
00036             const QString &sinkName = QString::null);
00037 
00041         ~TestPlayer();
00042 
00048         void setPlayerOption(const int playerOption);
00049 
00056         void setAudioStretchFactor(const float audioStretchFactor);
00057 
00063         void play(const QString &waveFile);
00064 
00068         void setSinkName(const QString &sinkName);
00069 
00073         Player* createPlayerObject(int playerOption);
00074 
00075     private:
00076 
00082         QString makeSuggestedFilename();
00083 
00089         int m_playerOption;
00090 
00094         float m_audioStretchFactor;
00095 
00099         QString m_sinkName;
00100 
00104         Stretcher* m_stretcher;
00105 
00109         Player* m_player;
00110 };
00111 
00112 #endif      // _TESTPLAYER_H_
KDE Logo
This file is part of the documentation for kttsd Library Version 3.3.90.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Dec 12 14:37:18 2004 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003