1 /*
2 Copyright (C) 2005 The Pentagram team
3 Copyright (C) 2010 The Exult team
4 
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 */
19 #ifndef RAWAUDIOSAMPLE_H
20 #define RAWAUDIOSAMPLE_H
21 
22 #include "AudioSample.h"
23 
24 namespace Pentagram {
25 
26 class RawAudioSample : public AudioSample
27 {
28 public:
29 	RawAudioSample(std::unique_ptr<uint8[]> buffer, uint32 size,
30 				   uint32 rate, bool signeddata, bool stereo);
31 	void initDecompressor(void *DecompData) const override;
32 	uint32 decompressFrame(void *DecompData, void *samples) const override;
33 	void freeDecompressor(void *DecompData) const override;
34 
35 protected:
36 
37 	struct RawDecompData {
38 		uint32 pos;
39 	};
40 
41 	bool signeddata;
42 	int start_pos;
43 	bool byte_swap;
44 
45 };
46 
47 }
48 
49 #endif
50