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

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

Issue 9826023: Merge AudioRendererImpl and AudioRendererBase; add NullAudioSink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win build Created 8 years, 8 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/renderer/render_view_impl.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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // Returns the optimal low-latency buffer size for the audio hardware. 101 // Returns the optimal low-latency buffer size for the audio hardware.
102 // This is the smallest buffer size the system can comfortably render 102 // This is the smallest buffer size the system can comfortably render
103 // at without glitches. The buffer size is in sample-frames. 103 // at without glitches. The buffer size is in sample-frames.
104 MEDIA_EXPORT size_t GetAudioHardwareBufferSize(); 104 MEDIA_EXPORT size_t GetAudioHardwareBufferSize();
105 105
106 // Returns the channel layout for the specified audio input device. 106 // Returns the channel layout for the specified audio input device.
107 MEDIA_EXPORT ChannelLayout GetAudioInputHardwareChannelLayout( 107 MEDIA_EXPORT ChannelLayout GetAudioInputHardwareChannelLayout(
108 const std::string& device_id); 108 const std::string& device_id);
109 109
110 // Computes a buffer size based on the given |sample_rate|. Must be used in
111 // conjunction with AUDIO_PCM_LINEAR.
112 MEDIA_EXPORT size_t GetHighLatencyOutputBufferSize(int sample_rate);
113
110 // Functions that handle data buffer passed between processes in the shared 114 // Functions that handle data buffer passed between processes in the shared
111 // memory. Called on both IPC sides. 115 // memory. Called on both IPC sides.
112 116
113 MEDIA_EXPORT uint32 TotalSharedMemorySizeInBytes(uint32 packet_size); 117 MEDIA_EXPORT uint32 TotalSharedMemorySizeInBytes(uint32 packet_size);
114 MEDIA_EXPORT uint32 PacketSizeSizeInBytes(uint32 shared_memory_created_size); 118 MEDIA_EXPORT uint32 PacketSizeSizeInBytes(uint32 shared_memory_created_size);
115 MEDIA_EXPORT uint32 GetActualDataSizeInBytes(base::SharedMemory* shared_memory, 119 MEDIA_EXPORT uint32 GetActualDataSizeInBytes(base::SharedMemory* shared_memory,
116 uint32 shared_memory_size); 120 uint32 shared_memory_size);
117 MEDIA_EXPORT void SetActualDataSizeInBytes(base::SharedMemory* shared_memory, 121 MEDIA_EXPORT void SetActualDataSizeInBytes(base::SharedMemory* shared_memory,
118 uint32 shared_memory_size, 122 uint32 shared_memory_size,
119 uint32 actual_data_size); 123 uint32 actual_data_size);
120 MEDIA_EXPORT void SetUnknownDataSize(base::SharedMemory* shared_memory, 124 MEDIA_EXPORT void SetUnknownDataSize(base::SharedMemory* shared_memory,
121 uint32 shared_memory_size); 125 uint32 shared_memory_size);
122 MEDIA_EXPORT bool IsUnknownDataSize(base::SharedMemory* shared_memory, 126 MEDIA_EXPORT bool IsUnknownDataSize(base::SharedMemory* shared_memory,
123 uint32 shared_memory_size); 127 uint32 shared_memory_size);
124 128
125 #if defined(OS_WIN) 129 #if defined(OS_WIN)
126 130
127 // Does Windows support WASAPI? We are checking in lot of places, and 131 // Does Windows support WASAPI? We are checking in lot of places, and
128 // sometimes check was written incorrectly, so move into separate function. 132 // sometimes check was written incorrectly, so move into separate function.
129 MEDIA_EXPORT bool IsWASAPISupported(); 133 MEDIA_EXPORT bool IsWASAPISupported();
130 134
131 #endif // defined(OS_WIN) 135 #endif // defined(OS_WIN)
132 136
133 } // namespace media 137 } // namespace media
134 138
135 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_ 139 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | media/audio/audio_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698