[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.
>@@ -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?
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
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev