@file TSI_MMF_ACLNTOGG_PLAY.script
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

# Audio Client Utilities for Ogg-Vorbis Player tests

LOAD_SUITE TSI_MMFACLNT.DLL

delay 10000

/////////////////////////////////////////////////////////////////////
/////////////////////////// POSITIVE TESTS //////////////////////////
/////////////////////////////////////////////////////////////////////

######################### Audio Player tests #########################


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0001-CP
//!@SYMTestCaseDesc           Open an audio file and play (OGG)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Create a session. Open an audio file and then play the audio file.
//!@SYMTestExpectedResults    Plays audio, Doesn't leave. MapcInitComplete Callback returns KErrNone MapcPlayComplete Callback returns KErrNone
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0001-CP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0002-CP
//!@SYMTestCaseDesc           Open an audio descriptor and play (OGG)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Create a session. Play a piece of audio from a descriptor.
//!@SYMTestExpectedResults    Plays audio, Doesn't leave. MapcInitComplete Callback returns KErrNone MapcPlayComplete Callback returns KErrNone
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0002-CP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0003-CP
//!@SYMTestCaseDesc           Stop play and continue play.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Play preloaded audio, stop and then continue play. Checking that play continues correctly.
//!@SYMTestExpectedResults    Audio continues from start position.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0003-CP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0004-CP
//!@SYMTestCaseDesc           Pause play and continue play.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Play preloaded audio, pause and then continue play. Checking that play continues correctly.
//!@SYMTestExpectedResults    Audio continues from paused position.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0004-CP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0005-CP
//!@SYMTestCaseDesc           Set and enquire volume.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Change volume and check.
//!@SYMTestExpectedResults    Volume returned is correct.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0005-CP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0006-CP
//!@SYMTestCaseDesc           Repeat play an audio file.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Set number of repeats then play audio, checking the amount of times audio actually played.
//!@SYMTestExpectedResults    MapcPlayComplete Callback returns KErrNone. Time the play method and compare with a result of duration times number of r
//!epeats.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0006-CP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0007-CP
//!@SYMTestCaseDesc           Set and enquire balance.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Change balance and check.
//!@SYMTestExpectedResults    balance  returned is correct
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0007-CP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0008-HP
//!@SYMTestCaseDesc           Enquire audio duration
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Check duration against audio of a known length.
//!@SYMTestExpectedResults    returns a valid duration.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0008-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0013-HP
//!@SYMTestCaseDesc           Set play position.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set a position to start playing from within the audio.
//!@SYMTestExpectedResults    returns a valid position.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0013-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0014-HP
//!@SYMTestCaseDesc           Check meta data
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            View meta data and compare with known value.
//!@SYMTestExpectedResults    Value equals that of a known value
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0014-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0015-HP
//!@SYMTestCaseDesc           Enquire Maximum volume
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Get the maximum volume and compare with a known value.
//!@SYMTestExpectedResults    correct volume is returned
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0015-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0016-HP
//!@SYMTestCaseDesc           Set Volume ramp and play
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set the volume ramp and then play an audio clip.
//!@SYMTestExpectedResults    Volume ramps doesn’t leave and completes without error. The volume should have increased or decreased accordingly with the
//! ramp value that was set.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0016-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0017-HP
//!@SYMTestCaseDesc           Open an audio file, close it then open a new one.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Open an audio clip, then close this audio clip. Now open a new audio clip.
//!@SYMTestExpectedResults    Previous audio clip has closed and new one is initialisied and ready.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0017-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0018-HP
//!@SYMTestCaseDesc           Delete a defined play window.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Define a play window. Then delete this play window.
//!@SYMTestExpectedResults    Play window is succesfully reset to the duration of the clip.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0018-HP \audio.ini
TEST_COMPLETE


/////////////////////////////////////////////////////////////////////
/////////////////////////// NEGATIVE TESTS //////////////////////////
/////////////////////////////////////////////////////////////////////

//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1001-LP
//!@SYMTestCaseDesc           Set invalid volume (above maximum).
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set volume to an invalid value above that of the maximum.
//!@SYMTestExpectedResults    Should limit volume to the maximum volume value.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1001-LP \audio.ini
TEST_COMPLETE

//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1002-LP
//!@SYMTestCaseDesc           Set invalid volume (below minimum).
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set volume to an invalid value to that below the minimum.
//!@SYMTestExpectedResults    Should limit volume zero volume.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1002-LP \audio.ini
TEST_COMPLETE

//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1003-LP
//!@SYMTestCaseDesc           Set invalid balance (below minimum).
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set balance to an invalid balance value. Set balance above the maximum value and check.
//!@SYMTestExpectedResults    Should limit balance to valid values (-100).
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1003-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1004-LP
//!@SYMTestCaseDesc           Set invalid balance.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set balance to an invalid balance value. Set balance below the minimum value and check and check.
//!@SYMTestExpectedResults    Should limit balance to valid values (100).
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1004-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1005-LP
//!@SYMTestCaseDesc           Set invalid play window and attempt to play.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set play window to a minus start value and an end value beyond the duration of the audio.
//!@SYMTestExpectedResults    tone plays the duration of the window set
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1005-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1006-LP
//!@SYMTestCaseDesc           Set invalid audio position and play (beyond the end of the file)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set position to beyond the audio's duration and attempt to play.
//!@SYMTestExpectedResults    File should not play and the actual postion should be set to that of the files duration.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1006-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1007-LP
//!@SYMTestCaseDesc           Set invalid audio position and play (below the begining of the file)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set position to beyond the audio's below zero then play.
//!@SYMTestExpectedResults    File should not play and the actual postion should be set to zero.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1007-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1008-LP
//!@SYMTestCaseDesc           Audio clip - Delete object before play operation has completed.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            While the audio file is playing, delete the player utility object.
//!@SYMTestExpectedResults    The file should be closed correctly, play of the audio should have ceased and the object should have cleanly been delete
//!d.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1008-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1009-LP
//!@SYMTestCaseDesc           Open new file while audio player is playing.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Initialise and open an audio file. Start this player, then as it is playing attempt to open a new audio file.
//!@SYMTestExpectedResults    KErrInUse
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1009-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1010-LP
//!@SYMTestCaseDesc           Play using a corrupt descriptor.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Create and audio descriptor that has corrupt data. Attempt to plays this descriptor with the audio player.
//!@SYMTestExpectedResults    Should report KErrCorrupt or KErrInvalid
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1010-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1011-LP
//!@SYMTestCaseDesc           Playing when position set to the end of the audio.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set the head position to that of the audio's duration and then play.
//!@SYMTestExpectedResults    Shouldn’t return an error, but should not play or at least play from the beginning of the file.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1011-LP \audio.ini
TEST_COMPLETE

//For CR1424

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0030-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0030-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0031-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0031-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0032-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0032-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0033-HP

RUN_TEST_STEP 900000 ACLNT MM-MMF-ACLNTOGG-I-0033-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0034-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0034-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0035-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0035-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0036-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0036-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0037-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0037-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0038-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0038-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0039-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0039-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0040-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0040-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0041-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0041-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0042-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0042-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0043-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0043-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0044-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0044-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0045-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0045-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0046-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0046-HP \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNTOGG-I-0047-HP

RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0047-HP \audio.ini
TEST_COMPLETE