OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/codec/audio_decoder_speex.h" | 5 #include "remoting/codec/audio_decoder_speex.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "remoting/proto/audio.pb.h" | 13 #include "remoting/proto/audio.pb.h" |
14 #include "third_party/speex/speex.h" | 14 #include "third_party/speex/include/speex/speex_callbacks.h" |
| 15 #include "third_party/speex/include/speex/speex_stereo.h" |
15 | 16 |
16 namespace remoting { | 17 namespace remoting { |
17 | 18 |
18 namespace { | 19 namespace { |
19 | 20 |
20 // Hosts will never generate more than 100 frames in a single packet. | 21 // Hosts will never generate more than 100 frames in a single packet. |
21 const int kMaxFramesPerPacket = 100; | 22 const int kMaxFramesPerPacket = 100; |
22 | 23 |
23 } // namespace | 24 } // namespace |
24 | 25 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // Transform mono to stereo. | 110 // Transform mono to stereo. |
110 speex_decode_stereo_int(samples, speex_frame_size_, speex_stereo_state_); | 111 speex_decode_stereo_int(samples, speex_frame_size_, speex_stereo_state_); |
111 | 112 |
112 samples += (speex_frame_size_ * packet->channels()); | 113 samples += (speex_frame_size_ * packet->channels()); |
113 } | 114 } |
114 | 115 |
115 return decoded_packet.Pass(); | 116 return decoded_packet.Pass(); |
116 } | 117 } |
117 | 118 |
118 } // namespace remoting | 119 } // namespace remoting |
OLD | NEW |