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

Unified Diff: media/audio/mac/audio_manager_mac.cc

Issue 250803008: Syntax correction in audio_manager_mac.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_manager_mac.cc
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index fec5fad73a8422dec0a290c125b945e5fb6f4d2e..970720679abf418b9cd2ef11f49d017d75c60084 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -307,18 +307,15 @@ bool AudioManagerMac::HasAudioInputDevices() {
// TODO(xians): There are several places on the OSX specific code which
// could benefit from these helper functions.
-bool AudioManagerMac::GetDefaultInputDevice(
- AudioDeviceID* device) {
+bool AudioManagerMac::GetDefaultInputDevice(AudioDeviceID* device) {
return GetDefaultDevice(device, true);
}
-bool AudioManagerMac::GetDefaultOutputDevice(
- AudioDeviceID* device) {
+bool AudioManagerMac::GetDefaultOutputDevice(AudioDeviceID* device) {
return GetDefaultDevice(device, false);
}
-bool AudioManagerMac::GetDefaultDevice(
- AudioDeviceID* device, bool input) {
+bool AudioManagerMac::GetDefaultDevice(AudioDeviceID* device, bool input) {
CHECK(device);
// Obtain the current output device selected by the user.
@@ -329,14 +326,12 @@ bool AudioManagerMac::GetDefaultDevice(
pa.mElement = kAudioObjectPropertyElementMaster;
UInt32 size = sizeof(*device);
-
- OSStatus result = AudioObjectGetPropertyData(
- kAudioObjectSystemObject,
- &pa,
- 0,
- 0,
- &size,
- device);
+ OSStatus result = AudioObjectGetPropertyData(kAudioObjectSystemObject,
+ &pa,
+ 0,
+ 0,
+ &size,
+ device);
if ((result != kAudioHardwareNoError) || (*device == kAudioDeviceUnknown)) {
DLOG(ERROR) << "Error getting default AudioDevice.";
@@ -346,21 +341,16 @@ bool AudioManagerMac::GetDefaultDevice(
return true;
}
-bool AudioManagerMac::GetDefaultOutputChannels(
- int* channels) {
+bool AudioManagerMac::GetDefaultOutputChannels(int* channels) {
AudioDeviceID device;
if (!GetDefaultOutputDevice(&device))
return false;
-
- return GetDeviceChannels(device,
- kAudioDevicePropertyScopeOutput,
- channels);
+ return GetDeviceChannels(device, kAudioDevicePropertyScopeOutput, channels);
}
-bool AudioManagerMac::GetDeviceChannels(
- AudioDeviceID device,
- AudioObjectPropertyScope scope,
- int* channels) {
+bool AudioManagerMac::GetDeviceChannels(AudioDeviceID device,
+ AudioObjectPropertyScope scope,
+ int* channels) {
CHECK(channels);
// Get stream configuration.
@@ -379,13 +369,7 @@ bool AudioManagerMac::GetDeviceChannels(
AudioBufferList& buffer_list =
*reinterpret_cast<AudioBufferList*>(list_storage.get());
- result = AudioObjectGetPropertyData(
- device,
- &pa,
- 0,
- 0,
- &size,
- &buffer_list);
+ result = AudioObjectGetPropertyData(device, &pa, 0, 0, &size, &buffer_list);
if (result != noErr)
return false;
@@ -412,13 +396,12 @@ int AudioManagerMac::HardwareSampleRateForDevice(AudioDeviceID device_id) {
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster
};
- OSStatus result = AudioObjectGetPropertyData(
- device_id,
- &kNominalSampleRateAddress,
- 0,
- 0,
- &info_size,
- &nominal_sample_rate);
+ OSStatus result = AudioObjectGetPropertyData(device_id,
+ &kNominalSampleRateAddress,
+ 0,
+ 0,
+ &info_size,
+ &nominal_sample_rate);
if (result != noErr) {
OSSTATUS_DLOG(WARNING, result)
<< "Could not get default sample rate for device: " << device_id;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698