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 
40 namespace Common {
41 class SeekableReadStream;
42 }
43 
44 
45 namespace Audio {
46 
47 class PacketizedAudioStream;
48 class SeekableAudioStream;
49 
50 // There are several types of ADPCM encoding, only some are supported here
51 // For all the different encodings, refer to:
52 // http://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
55 enum 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 };
64 
78 SeekableAudioStream *makeADPCMStream(
80  DisposeAfterUse::Flag disposeAfterUse,
81  uint32 size, ADPCMType type,
82  int rate,
83  int channels,
84  uint32 blockAlign = 0);
85 
100 PacketizedAudioStream *makePacketizedADPCMStream(
101  ADPCMType type,
102  int rate,
103  int channels,
104  uint32 blockAlign = 0);
105 
106 } // End of namespace Audio
107 
108 #endif
Definition: stream.h:745
Definition: algorithm.h:29
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: system.h:37