ScummVM API documentation
adpcm.h
Go to the documentation of this file.
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
34#ifndef AUDIO_ADPCM_H
35#define AUDIO_ADPCM_H
36
37#include "common/scummsys.h"
38#include "common/types.h"
39
40namespace Common {
41class SeekableReadStream;
42}
43
44
45namespace Audio {
46
47class PacketizedAudioStream;
48class SeekableAudioStream;
49
50// There are several types of ADPCM encoding, only some are supported here
51// For all the different encodings, refer to:
52// https://wiki.multimedia.cx/index.php?title=Category:ADPCM_Audio_Codecs
53// Usually, if the audio stream we're trying to play has the FourCC header
54// string intact, it's easy to discern which encoding is used
55enum ADPCMType {
56 kADPCMOki, // Dialogic/Oki ADPCM (aka VOX)
57 kADPCMMSIma, // Microsoft IMA ADPCM
58 kADPCMMS, // Microsoft ADPCM
59 kADPCMDVI, // Intel DVI IMA ADPCM
60 kADPCMApple, // Apple QuickTime IMA ADPCM
61 kADPCMDK3, // Duck DK3 IMA ADPCM
62 kADPCMXA, // XA ADPCM
63 kADPCM4XM // 4XM ADPCM
64};
65
81 DisposeAfterUse::Flag disposeAfterUse,
82 uint32 size, ADPCMType type,
83 int rate,
84 int channels,
85 uint32 blockAlign = 0);
86
102 ADPCMType type,
103 int rate,
104 int channels,
105 uint32 blockAlign = 0);
106
107} // End of namespace Audio
108
109#endif
Definition: audiostream.h:446
Definition: audiostream.h:212
Definition: stream.h:745
Definition: system.h:39
PacketizedAudioStream * makePacketizedADPCMStream(ADPCMType type, int rate, int channels, uint32 blockAlign=0)
SeekableAudioStream * makeADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, ADPCMType type, int rate, int channels, uint32 blockAlign=0)
Definition: algorithm.h:29