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

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

Issue 5550006: Implement WebKitClientImpl::loadAudioResource() to decode in-memory audio fil... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years 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 | « no previous file | media/audio/audio_util.cc » ('j') | media/audio/audio_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 namespace media { 10 namespace media {
11 11
(...skipping 30 matching lines...) Expand all
42 // since clamping is performed a value of more than 1 is allowed to increase 42 // since clamping is performed a value of more than 1 is allowed to increase
43 // volume. 43 // volume.
44 // The buffer is modified in-place to avoid memory management, as this 44 // The buffer is modified in-place to avoid memory management, as this
45 // function may be called in performance critical code. 45 // function may be called in performance critical code.
46 bool FoldChannels(void* buf, 46 bool FoldChannels(void* buf,
47 size_t buflen, 47 size_t buflen,
48 int channels, 48 int channels,
49 int bytes_per_sample, 49 int bytes_per_sample,
50 float volume); 50 float volume);
51 51
52 // DeinterleaveAudioChannel() takes interleaved audio buffer |source|
53 // of the given |sample_fmt| and |number_of_channels| and extracts
54 // |number_of_frames| data for the given |channel_index| and
55 // puts it in the floating point |destination|.
56 // It returns |true| on success, or |false| if the |sample_fmt| is
57 // not recognized.
58 bool DeinterleaveAudioChannel(void* source,
59 float* destination,
60 int channels,
61 int channel_index,
62 int bytes_per_sample,
63 unsigned number_of_frames);
scherkus (not reviewing) 2010/12/14 20:41:48 nit: unsigned -> size_t/int (whatever makes sense)
64
52 } // namespace media 65 } // namespace media
53 66
54 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_ 67 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_util.cc » ('j') | media/audio/audio_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698