Backed out changeset 38414f29834c (bug 928797) on suspicion of turning bug 701384 permaorange on a CLOSED TREE
authorEd Morley <emorley@mozilla.com>
Thu, 24 Oct 2013 18:21:12 +0100
changeset 165808 348904f9fc0c99333ec7c1ba4c15195a43e6a0f7
parent 165807 cdfbe1d54ba1c70a1d98036afe59a44da3c94a64
child 165809 1203ba8ffc0dbb7a0d0dc429a58a36f9dd136d34
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs928797, 701384
milestone27.0a1
backs out38414f29834c053dd4a85a8f74af88ed64e78b69
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 38414f29834c (bug 928797) on suspicion of turning bug 701384 permaorange on a CLOSED TREE
media/libcubeb/src/cubeb_audiounit.c
--- a/media/libcubeb/src/cubeb_audiounit.c
+++ b/media/libcubeb/src/cubeb_audiounit.c
@@ -294,17 +294,17 @@ audiounit_stream_init(cubeb * context, c
   ComponentDescription desc;
   Component comp;
 #else
   AudioComponentDescription desc;
   AudioComponent comp;
 #endif
   cubeb_stream * stm;
   AURenderCallbackStruct input;
-  unsigned int buffer_size, default_buffer_size;
+  unsigned int buffer_size;
   OSStatus r;
   UInt32 size;
   AudioDeviceID output_device_id;
   AudioValueRange latency_range;
 
 
   assert(context);
   *stream = NULL;
@@ -403,39 +403,25 @@ audiounit_stream_init(cubeb * context, c
   }
 
   if (buffer_size < (unsigned int) latency_range.mMinimum) {
     buffer_size = (unsigned int) latency_range.mMinimum;
   } else if (buffer_size > (unsigned int) latency_range.mMaximum) {
     buffer_size = (unsigned int) latency_range.mMaximum;
   }
 
-  /**
-   * Get the default buffer size. If our latency request is below the default,
-   * set it. Otherwise, use the default latency.
-   **/
-  r = AudioUnitGetProperty(stm->unit, kAudioDevicePropertyBufferFrameSize,
-                           kAudioUnitScope_Output, 0, &default_buffer_size, &size);
-
+  /* Set the maximum number of frame that the render callback will ask for,
+   * effectively setting the latency of the stream. This is process-wide. */
+  r = AudioUnitSetProperty(stm->unit, kAudioDevicePropertyBufferFrameSize,
+                           kAudioUnitScope_Output, 0, &buffer_size, sizeof(buffer_size));
   if (r != 0) {
     audiounit_stream_destroy(stm);
     return CUBEB_ERROR;
   }
 
-  if (buffer_size < default_buffer_size) {
-    /* Set the maximum number of frame that the render callback will ask for,
-     * effectively setting the latency of the stream. This is process-wide. */
-    r = AudioUnitSetProperty(stm->unit, kAudioDevicePropertyBufferFrameSize,
-                             kAudioUnitScope_Output, 0, &buffer_size, sizeof(buffer_size));
-    if (r != 0) {
-      audiounit_stream_destroy(stm);
-      return CUBEB_ERROR;
-    }
-  }
-
   r = AudioUnitSetProperty(stm->unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input,
                            0, &ss, sizeof(ss));
   if (r != 0) {
     audiounit_stream_destroy(stm);
     return CUBEB_ERROR;
   }
 
   r = AudioUnitInitialize(stm->unit);