Rewind session is needed as code indicates since even when a single player is used it is possible to introduce new streams into the player. If the player indicates that rewind is needed, the session needs to be rewound.

However, there is one exception to this - which is probably what you are stumbling on. If the audio session has not pushed any data into the audio device, then rewind can be skipped (although it is not normally harmful).

To fix hardware decoder issue, modify the code as follows and test:

    if ((m_bPaused || m_bStoppedDuringPause) &&
        (!m_pLastPausedPlayer || (m_pLastPausedPlayer == pPlayerToExclude)))
    {
-       if (bRewindNeeded)
+       if (bRewindNeeded && (m_dNumBytesWritten != 0))
        {
            RewindSession();
        }
           theErr = ActualResume();
    }

Milko

At 01:42 PM 10/30/2008, [EMAIL PROTECTED] wrote:
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
        boundary="----_=_NextPart_001_01C93AD0.14AD6216"


Any thoughts!
_____________________________________________ From: Srivastava Asheesh (EXT-Infovision-MSW/Dallas) Sent: Wednesday, October 29, 2008 4:05 PM To: '[email protected]'; '[EMAIL PROTECTED]' Subject: Query on CR-Client: Audio Stream rework for SMIL operation

Hi

I have a doubt on function HX_RESULT CHXAudioSession::Resume(CHXAudioPlayer* pPlayerToExclude, HXBOOL bRewindNeeded) [which is part of above mentioned CR], where RewindSession.function is called even when we don't have HELIX_FEATURE_AUDIO_MULTIPLAYER_PAUSE flag enabled. HX_RESULT CHXAudioSession::Resume(CHXAudioPlayer* pPlayerToExclude, HXBOOL bRewindNeeded) { HXLOGL3(HXLOG_ADEV, "CHXAudioSession[%p]::Resume(): player [%p]", this, pPlayerToExclude);

    HX_RESULT theErr = HXR_OK;

if ((m_bPaused || m_bStoppedDuringPause) && (!m_pLastPausedPlayer || (m_pLastPausedPlayer == pPlayerToExclude))) { if (bRewindNeeded) { RewindSession(); } theErr = ActualResume(); } #ifdef HELIX_FEATURE_AUDIO_MULTIPLAYER_PAUSE /* * we need to re-mix to start the newly resumed player instantly * and not delay it by pushdown */ else if (!GetDisableMultiPlayPauseSupport() && (NumberOfResumedPlayers() > 1 || (m_pLastPausedPlayer && m_pLastPausedPlayer != pPlayerToExclude))) { if (bRewindNeeded) { RewindSession(); } theErr = ActualResume(); } #endif

    return theErr; }

If we go back to Cayenne branch, we don't have this [RewindSession] call. HX_RESULT CHXAudioSession::Resume(CHXAudioPlayer* pPlayerToExclude) { HXLOGL3(HXLOG_ADEV, "CHXAudioSession[%p]::Pause(): exclude player [%p]", this, pPlayerToExclude);

    HX_RESULT theErr = HXR_OK;

if ((m_bPaused || m_bStoppedDuringPause) && (!m_pLastPausedPlayer || (m_pLastPausedPlayer == pPlayerToExclude))) { theErr = ActualResume(); } #ifdef HELIX_FEATURE_AUDIO_MULTIPLAYER_PAUSE /* * we need to re-mix to start the newly resumed player instantly * and not delay it by pushdown */ else if (!GetDisableMultiPlayPauseSupport() && (NumberOfResumedPlayers() > 1 || (m_pLastPausedPlayer && m_pLastPausedPlayer != pPlayerToExclude))) { RewindSession(pPlayerToExclude); theErr = ActualResume(); } #endif

    return theErr; }

If DSP decoder is used then while calling CHXAudioSession::Resume, bRewindNeeded gets enabled and that leads call to RewindSession, which empties the buffer list and that inturn adds filler (silence) frames to the audio device and audio play-back gets stuck. When I comment out call to RewindSession, audio play-back works fine. So, my question is, do we need to rewind the session, even when we don't have HELIX_FEATURE_AUDIO_MULTIPLAYER_PAUSE flag enabled? Regadrs Asheesh

_______________________________________________
Client-dev mailing list
[EMAIL PROTECTED]
http://lists.helixcommunity.org/mailman/listinfo/client-dev

_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev

Reply via email to