Planeshift
songhandle.h
Go to the documentation of this file.
1 /*
2  * songhandle.h, Author: Andrea Rizzi <88whacko@gmail.com>
3  *
4  * Copyright (C) 2001-2011 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef SONGHANDLE_H
21 #define SONGHANDLE_H
22 
23 //====================================================================================
24 // Local Includes
25 //====================================================================================
26 #include "handle.h"
27 
28 //------------------------------------------------------------------------------------
29 // Forward Declarations
30 //------------------------------------------------------------------------------------
31 class Instrument;
32 
33 
34 class SongHandle: public SoundHandle
35 {
36 public:
42  SongHandle(csRef<iDocument> musicalSheet, Instrument* instrument);
43 
47  virtual ~SongHandle();
48 
49 
50  // From SoundHandle
51  //------------------
52 
53  virtual bool Init(const char* resname, bool loop, float volume_preset,
54  int type, SoundControl* &ctrl, bool dopplerEffect);
55 
56 private:
57  Instrument* instrument;
58  csRef<iDocument> sheet;
59 };
60 
61 #endif /* SONGHANDLE_H */
A Volume and Sound control class.
Definition: control.h:40
bool dopplerEffect
true if the doppler effect is enabled for this sound
Definition: handle.h:186
SongHandle(csRef< iDocument > musicalSheet, Instrument *instrument)
Constructor.
This class represent a musical instrument.
Definition: instrument.h:68
virtual ~SongHandle()
Destructor.
virtual bool Init(const char *resname, bool loop, float volume_preset, int type, SoundControl *&ctrl, bool dopplerEffect)
Initialize this Handle.