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.
|
2003-11-29 12:11:01 +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.
|
2014-02-18 01:34:17 +00:00
|
|
|
*
|
2003-11-29 12:11:01 +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
|
|
|
*
|
2003-11-29 12:11:01 +00:00
|
|
|
* 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.
|
2003-11-29 12:11:01 +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:
|
|
|
|
* - agos
|
2011-01-21 14:37:46 +00:00
|
|
|
* - draci
|
2018-12-08 19:37:37 +00:00
|
|
|
* - glk
|
2009-03-08 15:57:59 +00:00
|
|
|
* - kyra
|
2011-01-21 14:37:46 +00:00
|
|
|
* - mohawk
|
2009-03-08 15:57:59 +00:00
|
|
|
* - queen
|
|
|
|
* - saga
|
2011-01-21 14:37:46 +00:00
|
|
|
* - sci
|
2009-03-08 15:57:59 +00:00
|
|
|
* - scumm
|
|
|
|
* - sword1
|
|
|
|
* - sword2
|
2016-09-03 13:58:50 +00:00
|
|
|
* - titanic
|
2009-03-08 15:57:59 +00:00
|
|
|
* - touche
|
|
|
|
* - tucker
|
|
|
|
*/
|
|
|
|
|
2011-10-28 10:27:50 +00:00
|
|
|
#ifndef AUDIO_MP3_H
|
|
|
|
#define AUDIO_MP3_H
|
2003-11-29 12:11:01 +00:00
|
|
|
|
2003-12-19 00:32:47 +00:00
|
|
|
#include "common/scummsys.h"
|
2010-06-15 12:33:20 +00:00
|
|
|
#include "common/types.h"
|
2003-12-19 00:32:47 +00:00
|
|
|
|
|
|
|
#ifdef USE_MAD
|
|
|
|
|
2005-05-10 22:56:25 +00:00
|
|
|
namespace Common {
|
2011-04-25 19:29:26 +00:00
|
|
|
class SeekableReadStream;
|
2005-05-10 22:56:25 +00:00
|
|
|
}
|
2003-11-29 12:11:01 +00:00
|
|
|
|
2006-04-29 22:33:31 +00:00
|
|
|
namespace Audio {
|
|
|
|
|
2015-08-10 00:04:59 +00:00
|
|
|
class PacketizedAudioStream;
|
2010-01-05 02:27:24 +00:00
|
|
|
class SeekableAudioStream;
|
2003-11-29 12:11:01 +00:00
|
|
|
|
2010-01-05 23:59:28 +00:00
|
|
|
/**
|
|
|
|
* Create a new SeekableAudioStream from the MP3 data in the given stream.
|
|
|
|
* Allows for seeking (which is why we require a SeekableReadStream).
|
|
|
|
*
|
|
|
|
* @param stream the SeekableReadStream from which to read the MP3 data
|
|
|
|
* @param disposeAfterUse whether to delete the stream after use
|
2010-06-15 12:33:20 +00:00
|
|
|
* @return a new SeekableAudioStream, or NULL, if an error occurred
|
2010-01-05 23:59:28 +00:00
|
|
|
*/
|
|
|
|
SeekableAudioStream *makeMP3Stream(
|
|
|
|
Common::SeekableReadStream *stream,
|
2010-01-16 21:36:08 +00:00
|
|
|
DisposeAfterUse::Flag disposeAfterUse);
|
2007-02-20 22:18:48 +00:00
|
|
|
|
2015-08-10 00:04:59 +00:00
|
|
|
/**
|
|
|
|
* Create a new PacketizedAudioStream from the first packet in the given
|
|
|
|
* stream. It does not own the packet and must be queued again later.
|
|
|
|
*
|
|
|
|
* @param firstPacket the SeekableReadStream from which to read the MP3 data
|
|
|
|
* @return a new PacketizedAudioStream
|
|
|
|
*/
|
|
|
|
PacketizedAudioStream *makePacketizedMP3Stream(
|
|
|
|
Common::SeekableReadStream &firstPacket);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new PacketizedAudioStream for a given number of channels
|
|
|
|
* and sample rate.
|
|
|
|
*
|
|
|
|
* @param firstPacket the SeekableReadStream from which to read the MP3 data
|
|
|
|
* @return a new PacketizedAudioStream
|
|
|
|
*/
|
|
|
|
PacketizedAudioStream *makePacketizedMP3Stream(
|
|
|
|
uint channels, uint rate);
|
|
|
|
|
2006-04-29 22:33:31 +00:00
|
|
|
} // End of namespace Audio
|
2003-11-29 12:11:01 +00:00
|
|
|
|
2006-04-29 22:33:31 +00:00
|
|
|
#endif // #ifdef USE_MAD
|
2011-10-28 10:27:50 +00:00
|
|
|
#endif // #ifndef AUDIO_MP3_H
|