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

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

Issue 12082111: Delete AudioOutputMixer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix .gyp Created 7 years, 10 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 | « media/audio/audio_output_proxy_unittest.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 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 21 matching lines...) Expand all
32 // simplify hardware requirements and to support a wider variety of input 32 // simplify hardware requirements and to support a wider variety of input
33 // formats. 33 // formats.
34 // The buffer is modified in-place to avoid memory management, as this 34 // The buffer is modified in-place to avoid memory management, as this
35 // function may be called in performance critical code. 35 // function may be called in performance critical code.
36 MEDIA_EXPORT bool AdjustVolume(void* buf, 36 MEDIA_EXPORT bool AdjustVolume(void* buf,
37 size_t buflen, 37 size_t buflen,
38 int channels, 38 int channels,
39 int bytes_per_sample, 39 int bytes_per_sample,
40 float volume); 40 float volume);
41 41
42 // MixStreams() mixes 2 audio streams with same sample rate and number of
43 // samples, adjusting volume on one of them.
44 // Dst += Src * volume.
45 MEDIA_EXPORT void MixStreams(void* dst,
46 void* src,
47 size_t buflen,
48 int bytes_per_sample,
49 float volume);
50
51 // Returns the default audio output hardware sample-rate. 42 // Returns the default audio output hardware sample-rate.
52 MEDIA_EXPORT int GetAudioHardwareSampleRate(); 43 MEDIA_EXPORT int GetAudioHardwareSampleRate();
53 44
54 // Returns the audio input hardware sample-rate for the specified device. 45 // Returns the audio input hardware sample-rate for the specified device.
55 MEDIA_EXPORT int GetAudioInputHardwareSampleRate( 46 MEDIA_EXPORT int GetAudioInputHardwareSampleRate(
56 const std::string& device_id); 47 const std::string& device_id);
57 48
58 // Returns the optimal low-latency buffer size for the audio hardware. 49 // Returns the optimal low-latency buffer size for the audio hardware.
59 // This is the smallest buffer size the system can comfortably render 50 // This is the smallest buffer size the system can comfortably render
60 // at without glitches. The buffer size is in sample-frames. 51 // at without glitches. The buffer size is in sample-frames.
(...skipping 10 matching lines...) Expand all
71 #if defined(OS_WIN) 62 #if defined(OS_WIN)
72 63
73 // Returns number of buffers to be used by wave out. 64 // Returns number of buffers to be used by wave out.
74 MEDIA_EXPORT int NumberOfWaveOutBuffers(); 65 MEDIA_EXPORT int NumberOfWaveOutBuffers();
75 66
76 #endif // defined(OS_WIN) 67 #endif // defined(OS_WIN)
77 68
78 } // namespace media 69 } // namespace media
79 70
80 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_ 71 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_
OLDNEW
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/audio_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698