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

Side by Side Diff: media/audio/mac/audio_output_mac.h

Issue 10832285: Switch OnMoreData() to use AudioBus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review ready. Created 8 years, 4 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_OUTPUT_MAC_H_ 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_OUTPUT_MAC_H_
6 #define MEDIA_AUDIO_MAC_AUDIO_OUTPUT_MAC_H_ 6 #define MEDIA_AUDIO_MAC_AUDIO_OUTPUT_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 #include <AudioUnit/AudioUnit.h> 10 #include <AudioUnit/AudioUnit.h>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // A flag to determine if downmix is needed from source to device layouts. 98 // A flag to determine if downmix is needed from source to device layouts.
99 bool should_down_mix_; 99 bool should_down_mix_;
100 100
101 // Event used for synchronization when stopping the stream. 101 // Event used for synchronization when stopping the stream.
102 // Callback sets it after stream is stopped. 102 // Callback sets it after stream is stopped.
103 base::WaitableEvent stopped_event_; 103 base::WaitableEvent stopped_event_;
104 // When stopping we keep track of number of buffers in flight and 104 // When stopping we keep track of number of buffers in flight and
105 // signal "stop completed" from the last buffer's callback. 105 // signal "stop completed" from the last buffer's callback.
106 int num_buffers_left_; 106 int num_buffers_left_;
107 107
108 // Container for retrieving data from AudioSourceCallback::OnMoreData().
109 scoped_ptr<AudioBus> audio_bus_;
110 base::Lock audio_bus_lock_;
Chris Rogers 2012/08/24 20:20:26 I don't think the lock is needed.
111
108 DISALLOW_COPY_AND_ASSIGN(PCMQueueOutAudioOutputStream); 112 DISALLOW_COPY_AND_ASSIGN(PCMQueueOutAudioOutputStream);
109 }; 113 };
110 114
111 } // namespace media 115 } // namespace media
112 116
113 #endif // MEDIA_AUDIO_MAC_AUDIO_OUTPUT_MAC_H_ 117 #endif // MEDIA_AUDIO_MAC_AUDIO_OUTPUT_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698