4 * Implementation for CD playback
8 * ***** BEGIN GPL LICENSE BLOCK *****
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
25 * All rights reserved.
27 * The Original Code is: all of this file.
29 * Contributor(s): none yet.
31 * ***** END GPL LICENSE BLOCK *****
34 #ifndef __SND_CDOBJECT_H
35 #define __SND_CDOBJECT_H
37 #include "SND_Object.h"
39 class SND_CDObject : public SND_Object
44 * Private to enforce singleton
47 SND_CDObject(const SND_CDObject&);
49 static SND_CDObject* m_instance;
50 MT_Scalar m_gain; /* the gain of the object */
51 int m_playmode; /* the way CD is played back (all, random, track, trackloop) */
52 int m_track; /* the track for 'track' and 'trackloop' */
53 int m_playstate; /* flag for current state of object */
55 bool m_used; /* flag for checking if we used the cd, if not don't
56 call the stop cd at the end */
59 static bool CreateSystem();
60 static bool DisposeSystem();
61 static SND_CDObject* Instance();
65 void SetGain(MT_Scalar gain);
66 void SetPlaymode(int playmode);
67 void SetTrack(int track);
68 void SetPlaystate(int playstate);
69 void SetModified(bool modified);
73 bool IsModified() const;
76 MT_Scalar GetGain() const;
77 int GetPlaymode() const;
78 int GetPlaystate() const;
82 #endif //__SND_CDOBJECT_H