Bug 943618 - complete audio silence with some USB headsets, r=padenot.
authorFlorian Quèze <florian@queze.net>
Fri, 31 Jan 2014 16:16:09 +0100
changeset 182288 eca43063ea0fae9aa10382df93f4898abb080074
parent 182287 cd5db3c0a02a7685e2170287e033ca725bae6d96
child 182289 074e87ffb410965abc94fcf098ce0e1eb6e1a761
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs943618
milestone29.0a1
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
Bug 943618 - complete audio silence with some USB headsets, r=padenot.
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;
   }