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

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

Issue 12387006: Pass more detailed audio hardware configuration information to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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_UNIFIED_MAC_H_ 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_UNIFIED_MAC_H_
6 #define MEDIA_AUDIO_MAC_AUDIO_UNIFIED_MAC_H_ 6 #define MEDIA_AUDIO_MAC_AUDIO_UNIFIED_MAC_H_
7 7
8 #include <CoreAudio/CoreAudio.h> 8 #include <CoreAudio/CoreAudio.h>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 26 matching lines...) Expand all
37 virtual bool Open() OVERRIDE; 37 virtual bool Open() OVERRIDE;
38 virtual void Close() OVERRIDE; 38 virtual void Close() OVERRIDE;
39 virtual void Start(AudioSourceCallback* callback) OVERRIDE; 39 virtual void Start(AudioSourceCallback* callback) OVERRIDE;
40 virtual void Stop() OVERRIDE; 40 virtual void Stop() OVERRIDE;
41 virtual void SetVolume(double volume) OVERRIDE; 41 virtual void SetVolume(double volume) OVERRIDE;
42 virtual void GetVolume(double* volume) OVERRIDE; 42 virtual void GetVolume(double* volume) OVERRIDE;
43 43
44 int input_channels() const { return input_channels_; } 44 int input_channels() const { return input_channels_; }
45 int output_channels() const { return output_channels_; } 45 int output_channels() const { return output_channels_; }
46 46
47 static bool GetDefaultOutputDevice(AudioDeviceID* device);
48
49 static bool GetDefaultOutputChannels(int* channels,
50 int* channels_per_frame);
51
52 static bool GetDeviceChannels(AudioDeviceID device,
53 AudioObjectPropertyScope scope,
54 int* channels,
55 int* channels_per_frame);
56
57
47 private: 58 private:
48 OSStatus Render(AudioDeviceID device, 59 OSStatus Render(AudioDeviceID device,
49 const AudioTimeStamp* now, 60 const AudioTimeStamp* now,
50 const AudioBufferList* input_data, 61 const AudioBufferList* input_data,
51 const AudioTimeStamp* input_time, 62 const AudioTimeStamp* input_time,
52 AudioBufferList* output_data, 63 AudioBufferList* output_data,
53 const AudioTimeStamp* output_time); 64 const AudioTimeStamp* output_time);
54 65
55 static OSStatus RenderProc(AudioDeviceID device, 66 static OSStatus RenderProc(AudioDeviceID device,
56 const AudioTimeStamp* now, 67 const AudioTimeStamp* now,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Intermediate buffers used with call to OnMoreIOData(). 102 // Intermediate buffers used with call to OnMoreIOData().
92 scoped_ptr<AudioBus> input_bus_; 103 scoped_ptr<AudioBus> input_bus_;
93 scoped_ptr<AudioBus> output_bus_; 104 scoped_ptr<AudioBus> output_bus_;
94 105
95 DISALLOW_COPY_AND_ASSIGN(AudioHardwareUnifiedStream); 106 DISALLOW_COPY_AND_ASSIGN(AudioHardwareUnifiedStream);
96 }; 107 };
97 108
98 } // namespace media 109 } // namespace media
99 110
100 #endif // MEDIA_AUDIO_MAC_AUDIO_UNIFIED_MAC_H_ 111 #endif // MEDIA_AUDIO_MAC_AUDIO_UNIFIED_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698