> "Nokia submits this code under 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: 16-Oct-2007
> 
>       Project: SymbianMmf_rel
> 
>       ErrorId: EOVL-6XRV6P
>                   
>       Synopsis:  CR: Symbian Fix to avoid replay of audio during
> pause/resume.
> 
>       DevSound does not have support for pause, so we issue Stop
> during pause. To avoid loss of data we have introduced resupplying of
> unplayed data. Resupplying of unplayed data is based on the samples
> played count from devsound. Samples played count was not updated after
> stop which resulted in replaying a small amount of audio data.
> 
>       Added code to update the samples statistics after stop is
> issued. Also moved the unplayed sample retrieval to InitplayPending
> instead of InitPausedState. Some version of DevSound could still send
> SamplesPlayed count zero after stop. The CR handles that case too.
> 
>       NOTE: The replay of audio data is dependent on the accuracy of
> samples played from devsound.
> 
>         
>       Root Cause of the problem: Implementation. 
>        
>       Files Modified:
>       Audio/device/platform/symbian/common/CHXBaseAudioSession.cpp
> 
>       Image Size and Heap Use impact: no impact
> 
>       Module Release testing (STIF) :  Passed.
> 
>       Test case(s) Added  :  No. Requires user observation to detect
> the problem.
> 
>       Memory leak check performed : Yes.  No new leaks introduced. 
> 
>       Platforms and Profiles Build Verified:
> helix-client-s60-32-mmf-mdf-arm
> 
>       Platforms and Profiles Functionality verified: armv5,winscw
> 
>       Branch: Head & 210CayS
> 
        Index: platform/symbian/common/CHXBaseAudioSession.cpp
        
===================================================================
        RCS file:
/cvsroot/audio/device/platform/symbian/common/CHXBaseAudioSession.cpp,
        v
        retrieving revision 1.1.2.2
        diff -w -u -b -r1.1.2.2 CHXBaseAudioSession.cpp
        --- platform/symbian/common/CHXBaseAudioSession.cpp     2 May
2007 16:06:46 -000
        0       1.1.2.2
        +++ platform/symbian/common/CHXBaseAudioSession.cpp     18 Oct
2007 17:41:33 -00
        00
        @@ -425,6 +425,10 @@
                     // The device resets on pause.
                     // Unplayed samples played count are claimed to be
played.
                     m_pStream->Stop();
        +#ifdef HELIX_CONFIG_SYMBIAN_SAMPLESPLAYED
        +            // updates latest samples stat
        +            UpdateTimeSampleStats();
        +#endif
                 }
                 else
                 {
        @@ -727,6 +731,10 @@
         void CHXBaseAudioSession::InitPlayInitPendingState()
         {
             m_lastPlayError = KErrNone;
        +#ifdef HELIX_CONFIG_SYMBIAN_SAMPLESPLAYED
        +        RetrieveUnplayedSamplesFromPastQueue();
        +        m_resetTriggerUnplayedCount = m_unplayedSampleCount;
        +#endif
         }


        @@ -736,10 +744,6 @@
             if (m_deviceResetsOnPause)
             {
                 PrepareForDeviceReset();
        -#ifdef HELIX_CONFIG_SYMBIAN_SAMPLESPLAYED
        -        RetrieveUnplayedSamplesFromPastQueue();
        -        m_resetTriggerUnplayedCount = m_unplayedSampleCount;
        -#endif
             }

         }
        @@ -1267,12 +1271,15 @@

         void CHXBaseAudioSession::UpdateTimeSampleStats()
         {
        -    if (PLAYING != m_state)
        +    if((PLAYING != m_state) && (PAUSED != m_state))
             {
                 // in case samples written increased since last check
                 UpdateUnplayedSampleCount();

                 // sample count is only reliable in PLAYING state;
don't do anything el
        se at this time
        +        // However some DevSound versions might be able to
report samples playe
        d during PAUSED state.
        +        // Hence relying on samplecount reset pending for
PAUSED state handling
        .
        +
                 HXLOGL4(HXLOG_ADEV,
"CHXBaseAudioSession::UpdateUnplayedSampleCount():
        state = %s (no update)", StringifyState(m_state));
                 return;
             }
_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev

Reply via email to