Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Side by Side Diff: media/audio/audio_util.h

Issue 9221010: Adds support for 16kHz input sample rate and mono channel config. in WebRTC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed more size_t Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/test/webrtc_audio_device_test.cc ('k') | media/audio/audio_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef MEDIA_AUDIO_AUDIO_UTIL_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_UTIL_H_
6 #define MEDIA_AUDIO_AUDIO_UTIL_H_ 6 #define MEDIA_AUDIO_AUDIO_UTIL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 MEDIA_EXPORT double GetAudioHardwareSampleRate(); 83 MEDIA_EXPORT double GetAudioHardwareSampleRate();
84 84
85 // Returns the default audio input hardware sample-rate. 85 // Returns the default audio input hardware sample-rate.
86 MEDIA_EXPORT double GetAudioInputHardwareSampleRate(); 86 MEDIA_EXPORT double GetAudioInputHardwareSampleRate();
87 87
88 // Returns the optimal low-latency buffer size for the audio hardware. 88 // Returns the optimal low-latency buffer size for the audio hardware.
89 // This is the smallest buffer size the system can comfortably render 89 // This is the smallest buffer size the system can comfortably render
90 // at without glitches. The buffer size is in sample-frames. 90 // at without glitches. The buffer size is in sample-frames.
91 MEDIA_EXPORT size_t GetAudioHardwareBufferSize(); 91 MEDIA_EXPORT size_t GetAudioHardwareBufferSize();
92 92
93 // Returns the default number of channels for the audio input hardware.
94 MEDIA_EXPORT uint32 GetAudioInputHardwareChannelCount();
95
93 // Functions that handle data buffer passed between processes in the shared 96 // Functions that handle data buffer passed between processes in the shared
94 // memory. Called on both IPC sides. 97 // memory. Called on both IPC sides.
95 98
96 MEDIA_EXPORT uint32 TotalSharedMemorySizeInBytes(uint32 packet_size); 99 MEDIA_EXPORT uint32 TotalSharedMemorySizeInBytes(uint32 packet_size);
97 MEDIA_EXPORT uint32 PacketSizeSizeInBytes(uint32 shared_memory_created_size); 100 MEDIA_EXPORT uint32 PacketSizeSizeInBytes(uint32 shared_memory_created_size);
98 MEDIA_EXPORT uint32 GetActualDataSizeInBytes(base::SharedMemory* shared_memory, 101 MEDIA_EXPORT uint32 GetActualDataSizeInBytes(base::SharedMemory* shared_memory,
99 uint32 shared_memory_size); 102 uint32 shared_memory_size);
100 MEDIA_EXPORT void SetActualDataSizeInBytes(base::SharedMemory* shared_memory, 103 MEDIA_EXPORT void SetActualDataSizeInBytes(base::SharedMemory* shared_memory,
101 uint32 shared_memory_size, 104 uint32 shared_memory_size,
102 uint32 actual_data_size); 105 uint32 actual_data_size);
(...skipping 13 matching lines...) Expand all
116 // Crossfades |bytes_to_crossfade| bytes of data in |dest| with the 119 // Crossfades |bytes_to_crossfade| bytes of data in |dest| with the
117 // data in |src|. Assumes there is room in |dest| and enough data in |src|. 120 // data in |src|. Assumes there is room in |dest| and enough data in |src|.
118 MEDIA_EXPORT void Crossfade(int bytes_to_crossfade, int number_of_channels, 121 MEDIA_EXPORT void Crossfade(int bytes_to_crossfade, int number_of_channels,
119 int bytes_per_channel, const uint8* src, 122 int bytes_per_channel, const uint8* src,
120 uint8* dest); 123 uint8* dest);
121 124
122 125
123 } // namespace media 126 } // namespace media
124 127
125 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_ 128 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_
OLDNEW
« no previous file with comments | « content/test/webrtc_audio_device_test.cc ('k') | media/audio/audio_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698