2002-08-24 15:31:37 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2004-01-06 12:45:34 +00:00
|
|
|
* Copyright (C) 2002-2004 The ScummVM project
|
2002-08-24 15:31:37 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
#ifndef SMUSH_MIXER_H
|
|
|
|
#define SMUSH_MIXER_H
|
2002-08-24 15:31:37 +00:00
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
#include "stdafx.h"
|
2003-03-17 12:28:50 +00:00
|
|
|
#include "sound/mixer.h"
|
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
namespace Scumm {
|
|
|
|
|
2003-03-17 12:28:50 +00:00
|
|
|
class SmushChannel;
|
|
|
|
|
|
|
|
class SmushMixer {
|
2003-12-18 01:22:28 +00:00
|
|
|
enum {
|
|
|
|
NUM_CHANNELS = 16
|
|
|
|
};
|
2003-03-17 12:28:50 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
SoundMixer *_mixer;
|
2003-12-24 17:29:07 +00:00
|
|
|
struct channels {
|
2003-03-17 12:28:50 +00:00
|
|
|
int id;
|
|
|
|
SmushChannel *chan;
|
2003-12-18 01:22:28 +00:00
|
|
|
PlayingSoundHandle handle;
|
|
|
|
} _channels[NUM_CHANNELS];
|
2002-08-24 15:31:37 +00:00
|
|
|
|
2003-03-17 12:28:50 +00:00
|
|
|
int _soundFrequency;
|
2002-08-24 15:31:37 +00:00
|
|
|
|
2003-03-17 12:28:50 +00:00
|
|
|
public:
|
2002-08-24 15:31:37 +00:00
|
|
|
|
2003-03-17 12:28:50 +00:00
|
|
|
SmushMixer(SoundMixer *);
|
|
|
|
virtual ~SmushMixer();
|
|
|
|
SmushChannel *findChannel(int32 track);
|
2003-12-18 01:22:28 +00:00
|
|
|
void addChannel(SmushChannel *c);
|
2003-03-17 12:28:50 +00:00
|
|
|
bool handleFrame();
|
|
|
|
bool stop();
|
|
|
|
bool update();
|
|
|
|
};
|
2003-10-03 18:33:57 +00:00
|
|
|
|
|
|
|
} // End of namespace Scumm
|
|
|
|
|
|
|
|
#endif
|