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

kgoldrunner

KGrSoundBank Class Reference

#include <kgrsoundbank.h>

Inheritance diagram for KGrSoundBank:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 26 of file kgrsoundbank.h.


Public Member Functions

 KGrSoundBank (int number)
int loadSound (const QString &fileName)
int play (int effect, bool looping=false)
void reset ()
void setEffectsVolume (double volume)
void setMusicVolume (double volume)
void setMuted (bool mute)
void stop (int token)
void stopAllSounds ()
 ~KGrSoundBank ()

Constructor & Destructor Documentation

KGrSoundBank::KGrSoundBank ( int  number  ) 

Construct the KGrSoundBank class.

Parameters:
number - how many audio channels are required

Definition at line 23 of file kgrsoundbank.cpp.

KGrSoundBank::~KGrSoundBank (  ) 

Definition at line 35 of file kgrsoundbank.cpp.


Member Function Documentation

int KGrSoundBank::loadSound ( const QString &  fileName  ) 

Load a sound sample.

A token is returned to use to play back the sample.

Definition at line 43 of file kgrsoundbank.cpp.

int KGrSoundBank::play ( int  effect,
bool  looping = false 
)

Play a sound effect.

This method returns a token that can be used to stop the sound if it is still playing. Trying to stop a completed sound has no effect.

Definition at line 64 of file kgrsoundbank.cpp.

void KGrSoundBank::reset (  ) 

Stop sound and discard the loaded sound effects.

Definition at line 58 of file kgrsoundbank.cpp.

void KGrSoundBank::setEffectsVolume ( double  volume  ) 

Set volume for the sound effects.

Parameters:
volume the playing volume. 0.0 means mute, 1.0 means full volume.

void KGrSoundBank::setMusicVolume ( double  volume  ) 

Set volume for the background music.

Parameters:
volume the playing volume. 0.0 means mute, 1.0 means full volume.

void KGrSoundBank::setMuted ( bool  mute  ) 

Definition at line 121 of file kgrsoundbank.cpp.

void KGrSoundBank::stop ( int  token  ) 

Stop playing the sound associated with the given token.

Definition at line 99 of file kgrsoundbank.cpp.

void KGrSoundBank::stopAllSounds (  ) 

Stop all sounds currently playing.

Definition at line 50 of file kgrsoundbank.cpp.


The documentation for this class was generated from the following files:
  • kgrsoundbank.h
  • kgrsoundbank.cpp

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