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

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

Issue 9310004: Fix crash on Mac OS X caused by querying audio stream latency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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_low_latency_output_mac.cc
===================================================================
--- media/audio/mac/audio_low_latency_output_mac.cc (revision 119720)
+++ media/audio/mac/audio_low_latency_output_mac.cc (working copy)
@@ -328,39 +328,8 @@
OSSTATUS_DLOG_IF(WARNING, result != noErr, result)
<< "Could not get audio device latency";
- // Get the stream latency.
- property_address.mSelector = kAudioDevicePropertyStreams;
- UInt32 stream_latency_frames = 0;
- result = AudioObjectGetPropertyDataSize(output_device_id_,
- &property_address,
- 0,
- NULL,
- &size);
- if (!result) {
- scoped_ptr_malloc<AudioStreamID>
- streams(reinterpret_cast<AudioStreamID*>(malloc(size)));
- AudioStreamID* stream_ids = streams.get();
- result = AudioObjectGetPropertyData(output_device_id_,
- &property_address,
- 0,
- NULL,
- &size,
- stream_ids);
- if (!result) {
- property_address.mSelector = kAudioStreamPropertyLatency;
- result = AudioObjectGetPropertyData(stream_ids[0],
- &property_address,
- 0,
- NULL,
- &size,
- &stream_latency_frames);
- }
- }
- OSSTATUS_DLOG_IF(WARNING, result != noErr, result)
- << "Could not get audio stream latency";
-
return static_cast<double>((audio_unit_latency_sec *
- format_.mSampleRate) + device_latency_frames + stream_latency_frames);
+ format_.mSampleRate) + device_latency_frames);
}
double AUAudioOutputStream::GetPlayoutLatency(
« 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