2007-05-30 21:56:52 +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.
|
2004-02-22 14:11:16 +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
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2004-02-22 14:11:16 +00:00
|
|
|
*
|
2006-02-11 10:05:31 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2004-02-22 14:11:16 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SOUND_FLAC_H
|
|
|
|
#define SOUND_FLAC_H
|
|
|
|
|
|
|
|
#include "common/scummsys.h"
|
|
|
|
|
|
|
|
#ifdef USE_FLAC
|
|
|
|
|
2005-05-10 22:56:25 +00:00
|
|
|
namespace Common {
|
|
|
|
class File;
|
2007-02-22 18:21:01 +00:00
|
|
|
class SeekableReadStream;
|
2005-05-10 22:56:25 +00:00
|
|
|
}
|
2004-02-22 14:11:16 +00:00
|
|
|
|
2006-04-29 22:33:31 +00:00
|
|
|
namespace Audio {
|
|
|
|
|
|
|
|
class AudioStream;
|
2004-02-22 14:11:16 +00:00
|
|
|
|
2007-02-22 18:21:01 +00:00
|
|
|
/**
|
|
|
|
* Create a new AudioStream from the FLAC data in the given stream.
|
|
|
|
* Allows for looping (which is why we require a SeekableReadStream),
|
2007-09-19 08:40:12 +00:00
|
|
|
* and specifying only a portion of the data to be played, based
|
2007-02-22 18:21:01 +00:00
|
|
|
* on time offsets.
|
|
|
|
*
|
2007-02-22 20:46:09 +00:00
|
|
|
* @param stream the SeekableReadStream from which to read the FLAC data
|
2007-02-22 18:21:01 +00:00
|
|
|
* @param disposeAfterUse whether to delete the stream after use
|
2007-09-19 08:40:12 +00:00
|
|
|
* @param startTime the (optional) time offset in milliseconds from which to start playback
|
2007-02-22 18:21:01 +00:00
|
|
|
* @param duration the (optional) time in milliseconds specifying how long to play
|
|
|
|
* @param numLoops how often the data shall be looped (0 = infinite)
|
|
|
|
* @return a new AudioStream, or NULL, if an error occured
|
|
|
|
*/
|
|
|
|
AudioStream *makeFlacStream(
|
|
|
|
Common::SeekableReadStream *stream,
|
|
|
|
bool disposeAfterUse,
|
|
|
|
uint32 startTime = 0,
|
|
|
|
uint32 duration = 0,
|
|
|
|
uint numLoops = 1);
|
|
|
|
|
2006-04-29 22:33:31 +00:00
|
|
|
} // End of namespace Audio
|
|
|
|
|
2004-02-22 14:11:16 +00:00
|
|
|
#endif // #ifdef USE_FLAC
|
|
|
|
#endif // #ifndef SOUND_FLAC_H
|