Bug 943618 - Complete audio silence with some USB headsets. r=padenot, a=sledru
authorFlorian Quèze <florian@queze.net>
Fri, 31 Jan 2014 16:16:09 +0100
changeset 175214 e9224caee6bbf5257cebb70c132390118fbcad4c
parent 175213 40473fad5b7888d4e8ee7eb211ffcc5dc14d0ce2
child 175215 1d5f71dffacf61d184561ce3d5f67f15b2bdec84
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot, sledru
bugs943618
milestone28.0a2
Bug 943618 - Complete audio silence with some USB headsets. r=padenot, a=sledru
media/libcubeb/src/cubeb_audiounit.c
--- a/media/libcubeb/src/cubeb_audiounit.c
+++ b/media/libcubeb/src/cubeb_audiounit.c
@@ -415,26 +415,30 @@ audiounit_stream_init(cubeb * context, c
   r = AudioUnitGetProperty(stm->unit, kAudioDevicePropertyBufferFrameSize,
                            kAudioUnitScope_Output, 0, &default_buffer_size, &size);
 
   if (r != 0) {
     audiounit_stream_destroy(stm);
     return CUBEB_ERROR;
   }
 
+  // Setting the latency doesn't work well for USB headsets (eg. plantronics).
+  // Keep the default latency for now.
+#if 0
   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;
     }
   }
+#endif
 
   r = AudioUnitSetProperty(stm->unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input,
                            0, &ss, sizeof(ss));
   if (r != 0) {
     audiounit_stream_destroy(stm);
     return CUBEB_ERROR;
   }