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

Side by Side Diff: media/audio/win/wavein_input_win.h

Issue 23654035: Rename AudioInputDeviceTest to AudioManagerTest since that is what it tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@enumAll
Patch Set: Another friend fix. Created 7 years, 3 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
« no previous file with comments | « media/audio/win/audio_manager_win.h ('k') | media/media.gyp » ('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_WIN_WAVEIN_INPUT_WIN_H_ 5 #ifndef MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_
6 #define MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ 6 #define MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 enum State { 49 enum State {
50 kStateEmpty, // Initial state. 50 kStateEmpty, // Initial state.
51 kStateReady, // Device obtained and ready to record. 51 kStateReady, // Device obtained and ready to record.
52 kStateRecording, // Recording audio. 52 kStateRecording, // Recording audio.
53 kStateStopping, // Trying to stop, waiting for callback to finish. 53 kStateStopping, // Trying to stop, waiting for callback to finish.
54 kStateStopped, // Stopped. Device was reset. 54 kStateStopped, // Stopped. Device was reset.
55 kStateClosed // Device has been released. 55 kStateClosed // Device has been released.
56 }; 56 };
57 57
58 // Allow unit tests to query the device ID. 58 // Allow unit tests to query the device ID.
59 friend class AudioInputDeviceTest; 59 friend class AudioManagerTest;
60 60
61 // Windows calls us back with the recorded audio data here. See msdn 61 // Windows calls us back with the recorded audio data here. See msdn
62 // documentation for 'waveInProc' for details about the parameters. 62 // documentation for 'waveInProc' for details about the parameters.
63 static void CALLBACK WaveCallback(HWAVEIN hwi, UINT msg, DWORD_PTR instance, 63 static void CALLBACK WaveCallback(HWAVEIN hwi, UINT msg, DWORD_PTR instance,
64 DWORD_PTR param1, DWORD_PTR param2); 64 DWORD_PTR param1, DWORD_PTR param2);
65 65
66 // If windows reports an error this function handles it and passes it to 66 // If windows reports an error this function handles it and passes it to
67 // the attached AudioInputCallback::OnError(). 67 // the attached AudioInputCallback::OnError().
68 void HandleError(MMRESULT error); 68 void HandleError(MMRESULT error);
69 69
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 // Lock used to avoid conflicts when Stop() is called during a callback. 123 // Lock used to avoid conflicts when Stop() is called during a callback.
124 base::Lock lock_; 124 base::Lock lock_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); 126 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream);
127 }; 127 };
128 128
129 } // namespace media 129 } // namespace media
130 130
131 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ 131 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_
OLDNEW
« no previous file with comments | « media/audio/win/audio_manager_win.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698