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

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

Issue 551823005: [Hotword] Adding audio parameters to handle audio coming from the DSP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update stream type Created 6 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
« no previous file with comments | « no previous file | media/audio/cras/cras_input.cc » ('j') | media/audio/cras/cras_input.cc » ('J')
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_PARAMETERS_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_PARAMETERS_H_
6 #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 6 #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 kAudioCDSampleRate = 44100, 46 kAudioCDSampleRate = 44100,
47 }; 47 };
48 48
49 // Bitmasks to determine whether certain platform (typically hardware) audio 49 // Bitmasks to determine whether certain platform (typically hardware) audio
50 // effects should be enabled. 50 // effects should be enabled.
51 enum PlatformEffectsMask { 51 enum PlatformEffectsMask {
52 NO_EFFECTS = 0x0, 52 NO_EFFECTS = 0x0,
53 ECHO_CANCELLER = 0x1, 53 ECHO_CANCELLER = 0x1,
54 DUCKING = 0x2, // Enables ducking if the OS supports it. 54 DUCKING = 0x2, // Enables ducking if the OS supports it.
55 KEYBOARD_MIC = 0x4, 55 KEYBOARD_MIC = 0x4,
56 HOTWORD = 0x8,
56 }; 57 };
57 58
58 AudioParameters(); 59 AudioParameters();
59 AudioParameters(Format format, ChannelLayout channel_layout, 60 AudioParameters(Format format, ChannelLayout channel_layout,
60 int sample_rate, int bits_per_sample, 61 int sample_rate, int bits_per_sample,
61 int frames_per_buffer); 62 int frames_per_buffer);
62 AudioParameters(Format format, ChannelLayout channel_layout, 63 AudioParameters(Format format, ChannelLayout channel_layout,
63 int sample_rate, int bits_per_sample, 64 int sample_rate, int bits_per_sample,
64 int frames_per_buffer, int effects); 65 int frames_per_buffer, int effects);
65 AudioParameters(Format format, ChannelLayout channel_layout, 66 AudioParameters(Format format, ChannelLayout channel_layout,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (a.sample_rate() != b.sample_rate()) 126 if (a.sample_rate() != b.sample_rate())
126 return a.sample_rate() < b.sample_rate(); 127 return a.sample_rate() < b.sample_rate();
127 if (a.bits_per_sample() != b.bits_per_sample()) 128 if (a.bits_per_sample() != b.bits_per_sample())
128 return a.bits_per_sample() < b.bits_per_sample(); 129 return a.bits_per_sample() < b.bits_per_sample();
129 return a.frames_per_buffer() < b.frames_per_buffer(); 130 return a.frames_per_buffer() < b.frames_per_buffer();
130 } 131 }
131 132
132 } // namespace media 133 } // namespace media
133 134
134 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 135 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/cras/cras_input.cc » ('j') | media/audio/cras/cras_input.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698