<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Audio doesn't work on OSX due to bugs in the coreaudio implementation"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=65122">65122</a>
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Audio doesn't work on OSX due to bugs in the coreaudio implementation
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>blocker
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Mac OS X (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vtroshchinskiy@qindel.es
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>modules
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=79947" name="attach_79947" title="Fix bugs in coreaudio latency calculation code">attachment 79947</a> <a href="attachment.cgi?id=79947&action=edit" title="Fix bugs in coreaudio latency calculation code">[details]</a></span>
Fix bugs in coreaudio latency calculation code

Pulseaudio on OSX sometimes works and sometimes doesn't. When it works it
usually takes a while before sound starts playing. A sound file might start
playing after being stuck for a few minutes.

I tracked this down to a bug in the coreaudio implementation: the
get_latency_us function is buggy and uses an uninitialized variable as part of
the calculation. Sometimes the resulting latency turns out low enough for it to
play, sometimes not.

The attached patch fixes the issue. It also fixes AudioObjectGetPropertyData
calls that weren't working due to the wrong mScope and adds error logging.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>