Looks good.
=============================================
Eric Hyche (ehyche real.com)
Technical Lead
RealNetworks, Inc.
> -----Original Message-----
> From: audio-dev-bounces helixcommunity.org
> [mailto:audio-dev-bounces helixcommunity.org] On
Behalf Of
> rajesh.rathinasamy nokia.com
> Sent: Monday, November 06, 2006 12:15 PM
> To: audio-dev helixcommunity.org
> Subject: [Audio-dev] CR: Removing Assert on Symbian
Audio session MMF
>
> "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: rajesh.rathinasamy nokia.com
>
> Reviewed by:
>
> Date: 06-Nov-2006.
>
> Project: SymbianMmf
>
> ErrorId: EMBI-6V7GS7
>
> Synopsis: CR: Removing Assert on Symbian Audio
session MMF
>
> In emulator, the if PrepareForDeviceReset on audio
> session MMF is called twice used to raise an assert.
This
> case happens frequently when a Stop is followed by
Pause and
> also during the underflow cases (Happens on emulator
alone).
>
> Removed the assert and updated the function to prevent
> the variable reset twice.
>
> Also updated some logs to level 2 (mostly error
cases).
>
> The error has been tested for local & streaming
both on
> emulator and hardware.
>
>
> Files Modified:
> =========
>
>
audio/device/platform/symbian/audiosvr/mmf/audio_session-mmf
.cpp
>
> Image Size and Heap Use impact: no major impact
>
> 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/audiosvr/mmf/audio_session-mmf.cpp
>
============================================================
=======
> RCS file:
>
/cvsroot/audio/device/platform/symbian/audiosvr/mmf/audio_se
ss
> ion-mmf.
> cpp,v
> retrieving revision 1.14.2.4
> diff -w -u -b -r1.14.2.4 audio_session-mmf.cpp
> --- platform/symbian/audiosvr/mmf/audio_session-mmf.cpp
21
> Aug 2006 21:26:32 -00
> 00 1.14.2.4
> +++ platform/symbian/audiosvr/mmf/audio_session-mmf.cpp
6 Nov
> 2006 17:14:16 -000
> 0
>  -394,7 +394,7 
> m_Settings.iChannels = channelCount;
> m_Settings.iEncoding = EMMFSoundEncoding16BitPCM;
>
> - HXLOGL3(HXLOG_ADEV,
"HXSymbianAudioSession::Init(): rate
> = %ld; chan = %ld;
> sample frame = %lu bytes", m_sampleRate,
> m_Settings.iChannels, m_cbSample);
> + HXLOGL2(HXLOG_ADEV,
"HXSymbianAudioSession::Init(): rate
> = %ld; chan = %ld;
> sample frame = %lu bytes", m_sampleRate,
> m_Settings.iChannels, m_cbSample);
>
> switch (m_state)
> {
>  -585,9 +585,9 
> // For now only KErrServerBusy is handled as
recoverable error
> if(m_bDevSoundInitErr)
> {
> - HXLOGL3(HXLOG_ADEV,
> "HXSymbianAudioSession::GetTime(): Previous
PlayInit
> Failed. Retrying....n");
> + HXLOGL2(HXLOG_ADEV,
> "HXSymbianAudioSession::GetTime(): Previous
PlayInit
> Failed. Retrying....n");
> TRAPD(err, m_pStream->PlayInitL());
> - HXLOGL3(HXLOG_ADEV,
> "HXSymbianAudioSession::GetTime(): PlayInit
RetVal::
> %dn", err);
> + HXLOGL2(HXLOG_ADEV,
> "HXSymbianAudioSession::GetTime(): PlayInit
RetVal::
> %dn", err);
> if(err != KErrNone)
> {
> if(err != KErrServerBusy)
>  -743,7 +743,7 
> void
>
HXSymbianAudioSession::RequestDeviceTakenNotification()
> {
> - HXLOGL3(HXLOG_ADEV,
>
"HXSymbianAudioSession::RequestDeviceTakenNotification(
> )");
> + HXLOGL2(HXLOG_ADEV,
>
"HXSymbianAudioSession::RequestDeviceTakenNotification(
> )");
> m_wantsNotify = TRUE;
> m_notifyRequest = Message();
> }
>  -936,7 +936,7 
> {
> // DevSound error KErrServerBusy is
recoverable.
> // Hence flag is marked for retry
> - HXLOGL3(HXLOG_ADEV,
> "HXSymbianAudioSession: oPlayIni
t() PlayInit F
> ailed. Mark flag for retryn");
> + HXLOGL2(HXLOG_ADEV,
> "HXSymbianAudioSession: oPlayIni
t() PlayInit F
> ailed. Mark flag for retryn");
> m_bDevSoundInitErr = TRUE;
> }
> else
>  -1181,14 +1181,14 
> }
> }
>
> -// Called when a stop or pause (omap-based device) is
issued.
> +// Called when a stop or pause is issued.
> //
> void HXSymbianAudioSession::PrepareForDeviceReset()
> {
> #ifdef HELIX_CONFIG_SYMBIAN_SAMPLESPLAYED
>
> - HX_ASSERT(!m_sampleCountResetPending);
> -
> + if(m_sampleCountResetPending == FALSE)
> + {
> if (KErrNone == m_lastPlayError)
> {
> // preserve monotically increasing time when
device resumes
>  -1210,6 +1210,12 
> }
>
> m_sampleCountResetPending = TRUE;
> + }
> + else
> + {
> + // Session has been prepared already for
reset, So ignore.
> + // One possible scenario is Pause followed by
Stop
> + }
>
> #endif
> // this tracks samples written after device reset
trigger
>
>
_______________________________________________
Audio-dev mailing list
Audio-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/audio
-dev
|