2010-01-23 22:50:24 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2007-05-19 12:06:51 +00:00
|
|
|
*
|
2021-12-26 17:47:58 +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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2014-02-18 01:34:17 +00:00
|
|
|
*
|
2007-05-19 12:06:51 +00:00
|
|
|
* 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.
|
2014-02-18 01:34:17 +00:00
|
|
|
*
|
2007-05-19 12:06:51 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2021-12-26 17:47:58 +00:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2007-05-19 12:06:51 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-03-08 15:57:59 +00:00
|
|
|
/**
|
2009-11-25 10:55:25 +00:00
|
|
|
* @file
|
2009-03-08 15:57:59 +00:00
|
|
|
* Sound decoder used in engines:
|
|
|
|
* - cine
|
|
|
|
*/
|
|
|
|
|
2011-10-28 10:27:50 +00:00
|
|
|
#ifndef AUDIO_MODS_SOUNDFX_H
|
|
|
|
#define AUDIO_MODS_SOUNDFX_H
|
2007-05-19 12:06:51 +00:00
|
|
|
|
2011-04-24 08:34:27 +00:00
|
|
|
namespace Common {
|
|
|
|
class SeekableReadStream;
|
|
|
|
}
|
2007-05-19 12:06:51 +00:00
|
|
|
|
|
|
|
namespace Audio {
|
|
|
|
|
|
|
|
class AudioStream;
|
|
|
|
|
2007-05-20 11:50:06 +00:00
|
|
|
typedef byte *(*LoadSoundFxInstrumentCallback)(const char *name, uint32 *size);
|
|
|
|
|
2007-11-18 21:13:08 +00:00
|
|
|
/*
|
2007-12-08 09:20:18 +00:00
|
|
|
* Factory function for SoundFX modules. Reads all data from the
|
|
|
|
* given data stream and creates an AudioStream from this (no references to the
|
|
|
|
* stream object is kept). If loadCb is non 0, then instruments are loaded using
|
|
|
|
* it, buffers returned are free'd at the end of playback.
|
2007-11-18 21:13:08 +00:00
|
|
|
*/
|
2020-09-09 21:37:03 +00:00
|
|
|
AudioStream *makeSoundFxStream(Common::SeekableReadStream *data, LoadSoundFxInstrumentCallback loadCb, int rate = 44100, bool stereo = true, bool repeat = true, int periodScaleDivisor = 1);
|
2007-05-19 12:06:51 +00:00
|
|
|
|
|
|
|
} // End of namespace Audio
|
|
|
|
|
|
|
|
#endif
|