OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 static FilePlayer* CreateFilePlayer(const uint32_t instanceID, | 31 static FilePlayer* CreateFilePlayer(const uint32_t instanceID, |
32 const FileFormats fileFormat); | 32 const FileFormats fileFormat); |
33 | 33 |
34 static void DestroyFilePlayer(FilePlayer* player); | 34 static void DestroyFilePlayer(FilePlayer* player); |
35 | 35 |
36 // Read 10 ms of audio at |frequencyInHz| to |outBuffer|. |lengthInSamples| | 36 // Read 10 ms of audio at |frequencyInHz| to |outBuffer|. |lengthInSamples| |
37 // will be set to the number of samples read (not the number of samples per | 37 // will be set to the number of samples read (not the number of samples per |
38 // channel). | 38 // channel). |
39 virtual int Get10msAudioFromFile( | 39 virtual int Get10msAudioFromFile( |
40 int16_t* outBuffer, | 40 int16_t* outBuffer, |
41 int& lengthInSamples, | 41 size_t& lengthInSamples, |
42 int frequencyInHz) = 0; | 42 int frequencyInHz) = 0; |
43 | 43 |
44 // Register callback for receiving file playing notifications. | 44 // Register callback for receiving file playing notifications. |
45 virtual int32_t RegisterModuleFileCallback( | 45 virtual int32_t RegisterModuleFileCallback( |
46 FileCallback* callback) = 0; | 46 FileCallback* callback) = 0; |
47 | 47 |
48 // API for playing audio from fileName to channel. | 48 // API for playing audio from fileName to channel. |
49 // Note: codecInst is used for pre-encoded files. | 49 // Note: codecInst is used for pre-encoded files. |
50 virtual int32_t StartPlayingFile( | 50 virtual int32_t StartPlayingFile( |
51 const char* fileName, | 51 const char* fileName, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 const uint32_t /*outHeight*/) { | 102 const uint32_t /*outHeight*/) { |
103 return -1; | 103 return -1; |
104 } | 104 } |
105 | 105 |
106 protected: | 106 protected: |
107 virtual ~FilePlayer() {} | 107 virtual ~FilePlayer() {} |
108 | 108 |
109 }; | 109 }; |
110 } // namespace webrtc | 110 } // namespace webrtc |
111 #endif // WEBRTC_MODULES_UTILITY_INTERFACE_FILE_PLAYER_H_ | 111 #endif // WEBRTC_MODULES_UTILITY_INTERFACE_FILE_PLAYER_H_ |
OLD | NEW |