ScummVM API documentation
converse_speech.h
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 
22 #ifndef NUVIE_CORE_CONVERSE_SPEECH_H
23 #define NUVIE_CORE_CONVERSE_SPEECH_H
24 
25 #include "ultima/shared/std/containers.h"
26 #include "audio/mixer.h"
27 
28 namespace Ultima {
29 namespace Nuvie {
30 
31 class Configuration;
32 class U6Lib_n;
33 class U6Lzw;
34 class NuvieIOBuffer;
35 
36 typedef struct TownsSound {
37  Common::Path filename;
38  uint16 sample_num;
39 } TownsSound;
40 
42  // game system objects from nuvie
43  const Configuration *config;
44  Audio::SoundHandle handle;
46 
47 public:
49  ~ConverseSpeech();
50  void init(const Configuration *cfg);
51  void update();
52  void play_speech(uint16 actor_num, uint16 sample_num);
53 
54 protected:
55  NuvieIOBuffer *load_speech(const Common::Path &filename, uint16 sample_num);
56  inline sint16 convert_sample(uint16 raw_sample);
57  void wav_init_header(NuvieIOBuffer *wav_buffer, uint32 audio_length) const;
58 };
59 
60 } // End of namespace Nuvie
61 } // End of namespace Ultima
62 
63 #endif
Definition: configuration.h:61
Definition: list.h:39
Definition: path.h:52
Definition: detection.h:27
Definition: mixer.h:49
Definition: converse_speech.h:41
Definition: converse_speech.h:36
Definition: containers.h:200
Definition: nuvie_io.h:106