• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kgoldrunner

kgrsoundbank.h

Go to the documentation of this file.
00001 /*
00002     Copyright 2007 Luciano Montanaro <mikelima@cirulla.net>
00003 
00004     This program is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation; either version 2 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU General Public License for more details.
00013 
00014     You should have received a copy of the GNU General Public License
00015     along with this program; if not, write to the 
00016     Free Software Foundation, Inc., 
00017     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KGRSOUNDBANK_H
00021 #define KGRSOUNDBANK_H
00022 
00023 #include <Phonon/MediaObject>
00024 #include <Phonon/MediaSource>
00025 
00026 class KGrSoundBank : public QObject
00027 {
00028     Q_OBJECT
00029 public:
00030 
00035     KGrSoundBank(int number);
00036     ~KGrSoundBank();
00037 
00043     int play (int effect, bool looping = false);
00044 
00048     void stop (int token);
00049 
00054     int loadSound (const QString &fileName);
00055 
00059     void reset();
00060 
00064     void stopAllSounds();
00065 
00070     void setEffectsVolume (double volume);
00071    
00076     void setMusicVolume (double volume);
00077    
00078     void setMuted (bool mute);
00079 
00080 private slots:
00081     void freeChannels();
00082 
00083 private:
00084     QVector< Phonon::MediaSource > soundSamples;
00085     QVector< Phonon::MediaObject * > channels;
00086     QVector< int > tokens;
00087 
00088     int currentToken;
00089     bool muted;
00090 };
00091 
00092 #endif // KGRSOUNDBANK_H
00093 // vi: set sw=4 cino=\:0g0 :

kgoldrunner

Skip menu "kgoldrunner"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal