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

Side by Side Diff: trunk/src/media/audio/mac/audio_input_mac.h

Issue 335343004: Revert 277794 "Modifies AudioInputCallback::OnData and use media..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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
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_MAC_AUDIO_INPUT_MAC_H_ 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_
6 #define MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ 6 #define MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_
7 7
8 #include <AudioToolbox/AudioFormat.h> 8 #include <AudioToolbox/AudioFormat.h>
9 #include <AudioToolbox/AudioQueue.h> 9 #include <AudioToolbox/AudioQueue.h>
10 10
11 #include "base/cancelable_callback.h" 11 #include "base/cancelable_callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "media/audio/audio_io.h" 14 #include "media/audio/audio_io.h"
15 #include "media/audio/audio_parameters.h" 15 #include "media/audio/audio_parameters.h"
16 16
17 namespace media { 17 namespace media {
18 18
19 class AudioBus;
20 class AudioManagerMac; 19 class AudioManagerMac;
21 20
22 // Implementation of AudioInputStream for Mac OS X using the audio queue service 21 // Implementation of AudioInputStream for Mac OS X using the audio queue service
23 // present in OS 10.5 and later. Design reflects PCMQueueOutAudioOutputStream. 22 // present in OS 10.5 and later. Design reflects PCMQueueOutAudioOutputStream.
24 class PCMQueueInAudioInputStream : public AudioInputStream { 23 class PCMQueueInAudioInputStream : public AudioInputStream {
25 public: 24 public:
26 // Parameters as per AudioManager::MakeAudioInputStream. 25 // Parameters as per AudioManager::MakeAudioInputStream.
27 PCMQueueInAudioInputStream(AudioManagerMac* manager, 26 PCMQueueInAudioInputStream(AudioManagerMac* manager,
28 const AudioParameters& params); 27 const AudioParameters& params);
29 virtual ~PCMQueueInAudioInputStream(); 28 virtual ~PCMQueueInAudioInputStream();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 AudioQueueRef audio_queue_; 76 AudioQueueRef audio_queue_;
78 // Size of each of the buffers in |audio_buffers_| 77 // Size of each of the buffers in |audio_buffers_|
79 uint32 buffer_size_bytes_; 78 uint32 buffer_size_bytes_;
80 // True iff Start() has been called successfully. 79 // True iff Start() has been called successfully.
81 bool started_; 80 bool started_;
82 // Used to determine if we need to slow down |callback_| calls. 81 // Used to determine if we need to slow down |callback_| calls.
83 base::TimeTicks last_fill_; 82 base::TimeTicks last_fill_;
84 // Used to defer Start() to workaround http://crbug.com/160920. 83 // Used to defer Start() to workaround http://crbug.com/160920.
85 base::CancelableClosure deferred_start_cb_; 84 base::CancelableClosure deferred_start_cb_;
86 85
87 scoped_ptr<media::AudioBus> audio_bus_;
88
89 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); 86 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream);
90 }; 87 };
91 88
92 } // namespace media 89 } // namespace media
93 90
94 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ 91 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_
OLDNEW
« no previous file with comments | « trunk/src/media/audio/fake_audio_input_stream.cc ('k') | trunk/src/media/audio/mac/audio_input_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698