I need to check this in by 5:30pm today.

Modified by: [email protected]
Date: 11/19/2009
Project: RealPlayer for Netbook
Bug #9797: The performance of video/audio playback is very low with
Pulse Audio

Synopsis:
Fixing bug #9797: BigBuckBunny surround sound clip failed to play on Dell.
Also, AsianWind.mp3 played silently.

Overview:
I first reported AsianWind.mp3 playback issue in this CR:

Expose PulseAudio Support In Player GUI And Make PulseAudio The Default.
http://lists.helixcommunity.org/pipermail/player-dev/2009-November/004582.html
  I found the PulseAudio support worked well.

  I did find one clip, AsianWind.mp3 (sample rate 24000 Hz),
  that played silent with PulseAudio,
  while it shouldn't be.
  I am yet to figure out what goes wrong in this one case.
  Other 22050 Hz clips were playing fine.

Other vendors then reported that BigBuckBunny clips didn't play
with PulseAudio.

Both these issues are caused by the same logic problem, where
if Helix's audio data buffer size is identical to
the amount of space remaining in PulseAudio, the faulty logic was hitted:
  audlinux_pulseaudio.cpp line 807:
    && bufsize < writeable_size
That should be:
    && bufsize <= writeable_size

This fixed both issues so that playback works for those clips now.


Files Modified:
audio/device/platform/unix/audlinux_pulseaudio.cpp


Image Size and Heap Use impact (Client -Only):
None.

Platforms and Profiles Affected:
Linux

Distribution Libraries Affected:
None.

Distribution library impact and planned action:
None.

Platforms and Profiles Build Verified:
Profile: helix_client_moblin
Platform: linux-2.2-libc6-gcc32-i586

Platforms and Profiles Functionality verified:
Profile: helix_client_moblin
Platform: linux-2.2-libc6-gcc32-i586

Branch: 310Atlas, 3_4_10Atlas, 401Atlas.

Copyright assignment: I am a RealNetworks employee.

-- 
Daniel Yek.

Index: audlinux_pulseaudio.cpp
===================================================================
RCS file: /cvsroot/audio/device/platform/unix/audlinux_pulseaudio.cpp,v
retrieving revision 1.1.2.3
diff -u -w -r1.1.2.3 audlinux_pulseaudio.cpp
--- audlinux_pulseaudio.cpp	10 Nov 2009 08:35:45 -0000	1.1.2.3
+++ audlinux_pulseaudio.cpp	19 Nov 2009 23:20:00 -0000
@@ -804,7 +804,7 @@
 
         if( GetHXPulseAudioState() == HX_PA_STREAM_READY 
             && bufsize
-            && bufsize < writable_size 
+            && bufsize <= writable_size 
             && ! m_bStreamCorkOperationInProgress
             && m_wState == RA_AOS_OPEN_PLAYING )
         {
@@ -813,7 +813,7 @@
         else
         {
             HXLOGL4 (HXLOG_ADEV, "CAudioOutLinuxPA::HandleAvailableData(): No _PushBits(), "
-                    "GetCount() = %d, audio_state = %d, StreamCorkOperationInProgress = %d, "
+                    "GetCount() = %d, AudioState = %d, StreamCorkOperationInProgress = %d, "
                     "AudioData bufsize = %u, pa_stream_writable_size() = %u.", 
                     m_pWriteList->GetCount(), m_wState, m_bStreamCorkOperationInProgress, 
                     bufsize, writable_size);
_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev

Reply via email to