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

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

Issue 2718903003: Add play test.
Patch Set: updated.. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_output_resampler.cc ('k') | media/audio/mac/audio_low_latency_input_mac_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_auhal_mac.cc
diff --git a/media/audio/mac/audio_auhal_mac.cc b/media/audio/mac/audio_auhal_mac.cc
index e11885fa3d0a5e599a0462a698bc9c3063cb89b2..1098e9c518de534e787eda36036fb43918c6e336 100644
--- a/media/audio/mac/audio_auhal_mac.cc
+++ b/media/audio/mac/audio_auhal_mac.cc
@@ -468,6 +468,7 @@ bool AUHALStream::SetStreamFormat(
element,
&format,
sizeof(format));
+ OSSTATUS_LOG_IF(ERROR, result != noErr, result) << "Set StreamFormat failed.";
return (result == noErr);
}
@@ -489,7 +490,7 @@ bool AUHALStream::ConfigureAUHAL() {
OSStatus result = AudioComponentInstanceNew(comp, &audio_unit_);
if (result != noErr) {
- OSSTATUS_DLOG(ERROR, result) << "AudioComponentInstanceNew() failed.";
+ OSSTATUS_LOG(ERROR, result) << "AudioComponentInstanceNew() failed.";
return false;
}
@@ -506,6 +507,8 @@ bool AUHALStream::ConfigureAUHAL() {
&enable_IO,
sizeof(enable_IO));
if (result != noErr) {
+ OSSTATUS_LOG(ERROR, result)
+ << "kAudioOutputUnitProperty_EnableIO() failed.";
CloseAudioUnit();
return false;
}
@@ -519,6 +522,8 @@ bool AUHALStream::ConfigureAUHAL() {
&device_,
sizeof(AudioDeviceID));
if (result != noErr) {
+ OSSTATUS_LOG(ERROR, result)
+ << "kAudioOutputUnitProperty_CurrentDevice() failed.";
CloseAudioUnit();
return false;
}
@@ -533,6 +538,7 @@ bool AUHALStream::ConfigureAUHAL() {
output_channels_,
kAudioUnitScope_Input,
0)) {
+ LOG(ERROR) << "Set Stream format failed...";
CloseAudioUnit();
return false;
}
@@ -542,6 +548,7 @@ bool AUHALStream::ConfigureAUHAL() {
if (!manager_->MaybeChangeBufferSize(device_, audio_unit_, 0,
number_of_frames_, &size_was_changed,
&io_buffer_frame_size)) {
+ LOG(ERROR) << "Buffer size change failed...";
CloseAudioUnit();
return false;
}
@@ -558,6 +565,8 @@ bool AUHALStream::ConfigureAUHAL() {
&callback,
sizeof(callback));
if (result != noErr) {
+ OSSTATUS_LOG(ERROR, result)
+ << "kAudioUnitProperty_SetRenderCallback() failed.";
CloseAudioUnit();
return false;
}
@@ -566,7 +575,7 @@ bool AUHALStream::ConfigureAUHAL() {
result = AudioUnitInitialize(audio_unit_);
if (result != noErr) {
- OSSTATUS_DLOG(ERROR, result) << "AudioUnitInitialize() failed.";
+ OSSTATUS_LOG(ERROR, result) << "AudioUnitInitialize() failed.";
CloseAudioUnit();
return false;
}
@@ -580,10 +589,10 @@ void AUHALStream::CloseAudioUnit() {
return;
OSStatus result = AudioUnitUninitialize(audio_unit_);
- OSSTATUS_DLOG_IF(ERROR, result != noErr, result)
+ OSSTATUS_LOG_IF(ERROR, result != noErr, result)
<< "AudioUnitUninitialize() failed.";
result = AudioComponentInstanceDispose(audio_unit_);
- OSSTATUS_DLOG_IF(ERROR, result != noErr, result)
+ OSSTATUS_LOG_IF(ERROR, result != noErr, result)
<< "AudioComponentInstanceDispose() failed.";
audio_unit_ = 0;
}
@@ -638,7 +647,7 @@ void AUHALStream::SetAudioChannelLayout() {
audio_unit_, kAudioUnitProperty_AudioChannelLayout, kAudioUnitScope_Input,
0, channel_layout, layout_size);
if (result != noErr) {
- OSSTATUS_DLOG(ERROR, result)
+ OSSTATUS_LOG(ERROR, result)
<< "Failed to set audio channel layout. Using default layout.";
}
}
« no previous file with comments | « media/audio/audio_output_resampler.cc ('k') | media/audio/mac/audio_low_latency_input_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698