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

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

Issue 4661001: Simplified AudioOutputStream interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 10 years, 1 month 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 | « media/audio/linux/audio_manager_linux.cc ('k') | media/audio/mac/audio_input_mac.cc » ('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) 2010 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_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/AudioQueue.h> 8 #include <AudioToolbox/AudioQueue.h>
9 #include <AudioToolbox/AudioFormat.h> 9 #include <AudioToolbox/AudioFormat.h>
10 10
11 #include "media/audio/audio_io.h" 11 #include "media/audio/audio_io.h"
12 #include "media/audio/audio_parameters.h" 12 #include "media/audio/audio_parameters.h"
13 13
14 class AudioManagerMac; 14 class AudioManagerMac;
15 15
16 // Implementation of AudioInputStream for Mac OS X using the audio queue service 16 // Implementation of AudioInputStream for Mac OS X using the audio queue service
17 // present in OS 10.5 and later. Design reflects PCMQueueOutAudioOutputStream. 17 // present in OS 10.5 and later. Design reflects PCMQueueOutAudioOutputStream.
18 class PCMQueueInAudioInputStream : public AudioInputStream { 18 class PCMQueueInAudioInputStream : public AudioInputStream {
19 public: 19 public:
20 // Parameters as per AudioManager::MakeAudioInputStream. 20 // Parameters as per AudioManager::MakeAudioInputStream.
21 PCMQueueInAudioInputStream(AudioManagerMac* manager, 21 PCMQueueInAudioInputStream(AudioManagerMac* manager,
22 AudioParameters params, 22 AudioParameters params);
23 int samples_per_packet);
24 virtual ~PCMQueueInAudioInputStream(); 23 virtual ~PCMQueueInAudioInputStream();
25 24
26 // Implementation of AudioInputStream. 25 // Implementation of AudioInputStream.
27 virtual bool Open(); 26 virtual bool Open();
28 virtual void Start(AudioInputCallback* callback); 27 virtual void Start(AudioInputCallback* callback);
29 virtual void Stop(); 28 virtual void Stop();
30 virtual void Close(); 29 virtual void Close();
31 30
32 private: 31 private:
33 // Issue the OnError to |callback_|; 32 // Issue the OnError to |callback_|;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 AudioStreamBasicDescription format_; 64 AudioStreamBasicDescription format_;
66 // Handle to the OS audio queue object. 65 // Handle to the OS audio queue object.
67 AudioQueueRef audio_queue_; 66 AudioQueueRef audio_queue_;
68 // Size of each of the buffers in |audio_buffers_| 67 // Size of each of the buffers in |audio_buffers_|
69 uint32 buffer_size_bytes_; 68 uint32 buffer_size_bytes_;
70 69
71 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); 70 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream);
72 }; 71 };
73 72
74 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ 73 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_
OLDNEW
« no previous file with comments | « media/audio/linux/audio_manager_linux.cc ('k') | media/audio/mac/audio_input_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698