3
* This file Copyright (C) 2005 Robert Spearman
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
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.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
// manage an audio track
28
#ifdef HAVE_SDL_SDL_MIXER_H
29
#include <SDL/SDL_mixer.h>
34
Audio(const QString& filename, const QString& name, long int outputRate);
37
void sync(); // reset audio track time offset to elapsed time
41
void setVolume(float _volume);
42
void incrementVolume();
43
void decrementVolume();
44
QString getName() { return trackName; }
45
void update(double deltaTime);
51
static float masterVolume; // audio level
52
double elapsedSeconds; // current offset into the track
55
// SDL_mixer is not available - no audio
59
Audio(const QString& filename, const QString& name) {}
61
void play(bool loop) {}
66
void setVolume(float _volume) {}
67
void incrementVolume() {}
68
void decrementVolume() {}
69
QString getName() { return "Compiled with no Audio!"; }
70
void update(double deltaTime) {}