Revision 482adb6d server/include/ROS/UtteranceCallbackWrapperROS.h
server/include/ROS/UtteranceCallbackWrapperROS.h | ||
---|---|---|
53 | 53 |
// everything is ok, will be cleared on failures |
54 | 54 |
feedback.result = 1; |
55 | 55 |
|
56 |
boost::shared_ptr<Utterance> utterance(new Utterance());
|
|
56 |
std::shared_ptr<Utterance> utterance(new Utterance());
|
|
57 | 57 |
|
58 | 58 |
// copy values: |
59 | 59 |
utterance->set_text(request->utterance.text); |
60 | 60 |
|
61 |
boost::shared_ptr<AudioData> audio_data(new AudioData());
|
|
61 |
std::shared_ptr<AudioData> audio_data(new AudioData());
|
|
62 | 62 |
if (!extract_audio(request->utterance.audio, audio_data)) { |
63 | 63 |
feedback.result = 0; |
64 | 64 |
} |
... | ... | |
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
// convert ros message audio data to our own implementation |
82 |
bool extract_audio(hlrc_server::soundchunk sound_chunk, boost::shared_ptr<AudioData> audio_data) {
|
|
82 |
bool extract_audio(hlrc_server::soundchunk sound_chunk, std::shared_ptr<AudioData> audio_data) {
|
|
83 | 83 |
// extract data: |
84 | 84 |
unsigned int audio_len = sound_chunk.data.size(); |
85 | 85 |
char* audio_data_char = (char*)sound_chunk.data.data(); |
Also available in: Unified diff