Changes are commited to CVS.

NOTE: People interested in using Symbian DevSound's SamplesPlayed API
need to define the flag HELIX_CONFIG_SYMBIAN_SAMPLESPLAYED. 

Thanks,
Rajesh. 

>-----Original Message-----
>From: ext Greg Wright [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, September 29, 2005 11:42 AM
>To: Rathinasamy Rajesh (Nokia-TP-MSW/Dallas)
>Cc: [EMAIL PROTECTED]; audio-dev@helixcommunity.org
>Subject: Re: [Audio-dev] CR: Symbian Audio Session changes
>
>Ok then, looks good for HEAD.
>--greg.
>
>
>
>[EMAIL PROTECTED] wrote:
>> Greg, Thanks for your comments.
>> 
>> Comments inlined with Marker <<Rajesh>>.. 
>> 
>> 
>>>-----Original Message-----
>>>From: ext Greg Wright [mailto:[EMAIL PROTECTED]
>>>Sent: Wednesday, September 28, 2005 3:08 PM
>>>To: Rathinasamy Rajesh (Nokia-TP-MSW/Dallas)
>>>Cc: [EMAIL PROTECTED]; audio-dev@helixcommunity.org
>>>Subject: Re: [Audio-dev] CR: Symbian Audio Session changes
>>>
>>>[EMAIL PROTECTED] wrote:
>>>
>>>>"Nokia is bound by the terms of a commercial contribution agreement 
>>>>with RealNetworks, and I am authorized to contribute this 
>code under 
>>>>said agreement."
>>>>
>>>>Modified by:  [EMAIL PROTECTED]
>>>>
>>>>Reviewed by:
>>>>
>>>>Date: 09-23-2005.
>>>>
>>>>Project: Helix plugin for Symbian
>>>>
>>>>Synopsis: Symbian Audio Session MMF changes
>>>>
>>>>The following are the list of changes :
>>>>
>>>>* Symbian 9.0 changes ( Platform security changes )
>>>>    Csession & Rmessage are replaced with CSession2 & RMessage2. 
>>>>    Pause and Play will always result in PlayInit instead
>>>
>>>of PlayData to
>>>
>>>>resume audio flow. The code hadling was already available to handle 
>>>>this case. That flag was previously turned on only for 6630 device.
>>>>For symbian 9.0, by default the flag is turned on.
>>>>
>>>>All 9.0 changes are within the agreed upon compiler flag 
>>>>HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY.
>>>>     
>>>>* Integer overflow fix
>>>>    SamplesToMS had integer overflow. Changed 32 bit
>>>
>>>operation to 64. 
>>>
>>>>(NOTE: Not much change in CPU utilisation for 32 vs 64 bit usage)
>>>>
>>>>* SamplesPlayed time calculation fix
>>>>    Sample count is updated by converting into
>>>
>>>MilliSeconds. During the
>>>
>>>>Millisecond conversion if (count * 1000) becomes less than sample 
>>>>rate, then the count is discarded. This over a period of time 
>>>>accumulates to a value such that the blocks remaining in 
>AudioDevice 
>>>>is more than the MinBlockTobeQueued resulting in playout being 
>>>>blocked. So now the fix is to track the unaccounted samples count 
>>>>also. ( m_ulTimePlayedInSec & m_ulBalanceSamples are used 
>instead of 
>>>>m_msTimePlayed).
>>>>    
>>>>* DevSound Init Err handling
>>>>    In symbian 9.0, the pause and play in quick succession
>>>
>>>can result in
>>>
>>>>a ServerBusy error. So an error handling has been added to account 
>>>>that problem. The Error is flagged and since it is
>>>
>>>recoverable, it is
>>>
>>>>not reported to the client engine. When GetTime is called, then it 
>>>>looks for flag and re-inits the DevSound.
>>>>
>>>>* Add config to use DevSound's SamplesPlayed API
>>>>    Symbian DevSound's SamplesPlayed API is not reliable
>>>
>>>always. We have
>>>
>>>>seen cases where the SamplesPlayed count provided from 
>DevSound does 
>>>>not always match with the samples we wrote on to the DevSound. This 
>>>>problem may not be in all versions of Series 60. So for
>>>
>>>convenience a
>>>
>>>>compiler flag (HELIX_CONFIG_SYMBIAN_SAMPLESPLAYED) is added so that 
>>>>the usage of SamplesPlayed API can be sidelined. If flag is
>>>
>>>not turned
>>>
>>>>off, the samples written into DevSound will be used for timeline 
>>>>rather than the feedback from DevSound.
>>>>
>>>>All these changes have been tested on symbian-70s-wins 
>>>>symbian-70s-thumb
>>>>symbian-91-armv5
>>>>
>>>>Files Modified: 
>>>>===========
>>>>audio\device\platform\symbian\audiosvr\mmf\audio_session-mmf.h
>>>>audio\device\platform\symbian\audiosvr\mmf\audio_session-mmf.cpp
>>>>audio\device\auddevlib_symbian.pcf
>>>>
>>>>
>>>>Image Size and Heap Use impact: minor
>>>>
>>>>Platforms and Profiles Build Verified: helix-client-s60-advanced
>>>>
>>>>Platforms and Profiles Functionality verified: thumb, wins, armv5
>>>>
>>>>Branch: helix_restricted
>>>
>>>branch is HEAD (helix_restricted is just a BIF file name).
>>>
>>>
>>>
>>>
>>>>Index: auddevlib_symbian.pcf
>>>>===================================================================
>>>>RCS file: /cvsroot/audio/device/auddevlib_symbian.pcf,v
>>>>retrieving revision 1.3
>>>>diff -u -b -r1.3 auddevlib_symbian.pcf
>>>>--- auddevlib_symbian.pcf   1 Apr 2005 20:24:30 -0000       1.3
>>>>+++ auddevlib_symbian.pcf   23 Sep 2005 19:33:44 -0000
>>>>@@ -62,3 +62,5 @@
>>>>    project.AddIncludes("platform/symbian",
>>>>                        "platform/symbian/audiosvr",
>>>>                        "platform/symbian/audiosvr/mmf")
>>>>+
>>>>+project.AddDefines("HELIX_CONFIG_SYMBIAN_SAMPLESPLAYED")
>>>
>>>
>>>I think HELIX_CONFIG_SYMBIAN_SAMPLESPLAYED belongs in the .cf files 
>>>for each platform that wants to use it. That way we can turn 
>it on and 
>>>off for each platform that wants to use auddevlib. Just seems a bit 
>>>more flexable.
>> 
>> 
>> <<Rajesh>> You are correct. This define should not be in 
>> auddevlib_symbian.pcf. Being in that file will limit people 
>to control 
>> the flags for individual profile.
>> Based on tests & other comments also, I don't want this flag to be 
>> enabled. The DevSound's SamplesPlayed API does not seem to function 
>> properly. So profile users can turn on the flag when they have the 
>> real need for using that API. (So this file will not be checked in)
>> 
>> I tested long clips (30 min duration) with the flag Off and On. 
>> * With Original code on CVS (without my current change), the video 
>> lags behind audio by atleast 30 secs to 1 min.
>> * With new flag off, the A/V sync looks good. 
>> * And with new flag on, the A/V sync is slightly mismatched. 
>But that 
>> is because of SamplesPlayed from Devsound seems to report less than 
>> whatever is supplied.
>> 
>> It is better not to rely on that faulty API.
>> 
>> 
>>>
>>>>@@ -934,12 +829,27 @@
>>>>        m_pStream->SetPrioritySettings(prioritySettings);
>>>>    }
>>>>
>>>>+    // DevSound returns ServerBusy Error when Pause or Stop
>>>
>>>is immediately
>>>
>>>>+    // followed by Play. DevSound waits for response from
>>>
>>>the AudioPolicy
>>>
>>>>+    // Server and PlayInit during that case reports the
>>>
>>>ServerBusy error.
>>>
>>>>    TRAPD(err, m_pStream->PlayInitL());
>>>>    HXLOGL3(HXLOG_ADEV,
>>>
>>>"HXSymbianAudioSession::DoPlayInit(): result = %s", 
>>>StringifyKErr(err));
>>>
>>>>    if (err != KErrNone)
>>>>    {
>>>>+        if(err == KErrServerBusy)
>>>>+        {
>>>>+            // DevSound error KErrServerBusy is recoverable.
>>>>+            // Hence flag is marked for retry
>>>>+            HXLOGL3(HXLOG_ADEV,
>>>
>>>"HXSymbianAudioSession::DoPlayInit() PlayInit Failed. Mark flag for 
>>>retry\n");
>>>
>>>>+            m_bDevSoundInitErr = TRUE;
>>>>+        }
>>>>+        else
>>>>+        {
>>>>+           //PlayError(err);
>>>
>>>
>>>Are you sure you want that commented out?
>> 
>> 
>> <<Rajesh>> I will remove the commented code.
>> 
>> 
>>>Have you tried these changes on some fairly long durations A/V clips 
>>>so that you could detect any A/V sync issues? A live long duration 
>>>clip would be nice also. While playing some clips, do serveral pause 
>>>and resumes of different lengths and make sure there is no A/V drift 
>>>that occures. If you could do these tests for both Symbian 7.0s with 
>>>the SAMPLES support and your device that would be great.
>>>
>>>Other then that I did not see anything obvious and it looks good to 
>>>check in on HEAD.
>>>
>>>--greg.
>>>
>>>
>> 
>> 
>

_______________________________________________
Audio-dev mailing list
Audio-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/audio-dev

Reply via email to