@file TSI_MMF_ACLNTOGG_REC.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 Recorder tests

LOAD_SUITE TSI_MMFACLNT.DLL

delay 10000

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


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0101-CP
//!@SYMTestCaseDesc           Create a file based clip and record (OGG)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Open an audio file and start, then stop recording after two seconds.
//!@SYMTestExpectedResults    File with a length >0 is created. File plays with no errors.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0101-CP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0102-CP
//!@SYMTestCaseDesc           Open a file based clip and record (OGG)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Open an audio file and start, then stop recording after two seconds.
//!@SYMTestExpectedResults    File with a length >0 exists. Recording appends data to that file.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0102-CP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0103-CP
//!@SYMTestCaseDesc           Open a descriptor using OpenDesL and record (OGG)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Open a new audio descriptor as a location and start recording for a fixed length. Then check the recorded sizes.
//!@SYMTestExpectedResults    File with a length >0 is created. File plays with no errors.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0103-CP \audio.ini
TEST_COMPLETE


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


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0105-CP
//!@SYMTestCaseDesc           Enquire state at each state transition.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Request state and check that the returned state value equals that of the current state.
//!@SYMTestExpectedResults    Returned states are equal to that of the actual state.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0105-CP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0108-HP
//!@SYMTestCaseDesc           Set and enquire position
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set the position and check that position returned is correct.
//!@SYMTestExpectedResults    Return position is correct.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0108-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0109-HP
//!@SYMTestCaseDesc           Enquire duration
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Get duration and compare with known value.
//!@SYMTestExpectedResults    Known duration is returned
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0109-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0110-HP
//!@SYMTestCaseDesc           Set meta-information
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set meta-Information to be written to the clip header. After recording open file and check meta information.
//!@SYMTestExpectedResults    Meta Information is set correctly and is retrieved with identical strings.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0110-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0112-HP
//!@SYMTestCaseDesc           Set and Enquire balance
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set balance to a legal value, and enquire that this value has been set.
//!@SYMTestExpectedResults    correct balance is returned.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0112-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0113-HP
//!@SYMTestCaseDesc           Set maximum length of file in bytes and record
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set maximum length of bytes and record a file. Check that recorded bytes are correct.
//!@SYMTestExpectedResults    reocorded bytes is identical to that set as the maximum value.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0113-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0114-HP
//!@SYMTestCaseDesc           Query recordable formats
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Compare returned recordable formats with those expected.
//!@SYMTestExpectedResults    
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0114-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0115-HP
//!@SYMTestCaseDesc           Set and enquire Destination number of channels
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set the number of channels and check that the number of channels returned is correct.
//!@SYMTestExpectedResults    Doesn't leave.                                  The returned number of channels should equal the previously set number of
//! channels.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0115-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0116-HP
//!@SYMTestCaseDesc           Set Audio recording priority
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set the recording priority. This is used to arbitrate between simultaneous accesses of the sound hardware.
//!@SYMTestExpectedResults    Doesn’t Leave.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0116-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0117-HP
//!@SYMTestCaseDesc           Set and enquire Destination sample rate
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Query supported sample rates.                   Set the sample rate and check that the sample rate returned is correct.
//!@SYMTestExpectedResults    Doesn't leave.                                  The returned sample rate should equal the previously set sample rate.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0117-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0118-HP
//!@SYMTestCaseDesc           Set and enquire Destination bit rate
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Query supported bit rates.                   Set the bit rate and check that the bit rate returned is correct.
//!@SYMTestExpectedResults    Doesn't leave.                                  The returned bit rate should equal the previously set bit rate.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0118-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0119-HP
//!@SYMTestCaseDesc           Set and enquire Destination data types
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Query supported data types.                   Set the data type and check that the data type returned is correct.
//!@SYMTestExpectedResults    Doesn't leave.                                  The returned data type should be the same type as the previously set data
//! type.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0119-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0120-HP
//!@SYMTestCaseDesc           Set and enquire Destination format
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set the destination format and check that the format returned is correct.
//!@SYMTestExpectedResults    Doesn't leave.                                  The returned format should be the same type as the previously set format
//!.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0120-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0121-HP
//!@SYMTestCaseDesc           Set Audio device mode
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set the audio device mode. This function is provided for binary compatibility only
//!@SYMTestExpectedResults    Set the audio device mode. This function is provided for binary compatibility only
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0121-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0122-HP
//!@SYMTestCaseDesc           Set record volume
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Query maximum record volume. Set the record volume to the max volume and request current volume
//!@SYMTestExpectedResults    Set the volume to max supported volume. The volume returned by GetVolume should now equal the max volume.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0122-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0123-HP
//!@SYMTestCaseDesc           Set volume ramp
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set volume ramp
//!@SYMTestExpectedResults    VolumeRamp is set correctly to that which was specified
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0123-HP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-0133-HP
//!@SYMTestCaseDesc           Simple Record
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Simple Record with MaxWriteFile size to 40K
//!@SYMTestExpectedResults    Recording should stop after the max file size is reached
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-0133-HP \audio.ini
TEST_COMPLETE

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

//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1101-LP
//!@SYMTestCaseDesc           Record utility - Delete object before record operation has completed.
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            While recording audio, destroy record utility object.
//!@SYMTestExpectedResults    Stops recording and successfully deletes the object.
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1101-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1102-LP
//!@SYMTestCaseDesc           set gain to invalid gain value (above maximum)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            First, set gain  above the maximum value and check.
//!@SYMTestExpectedResults    Should limit gain to a valid value. Return with no error code or KErrNone
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1102-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1103-LP
//!@SYMTestCaseDesc           set gain to invalid gain value (below minimum)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            First, set gain below the minimum value and check.
//!@SYMTestExpectedResults    Should limit gain to a valid value. Return with no error code or KErrNone
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1103-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1104-LP
//!@SYMTestCaseDesc           Set invalid position (above maximum)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            First, set position above the maximum value and check.
//!@SYMTestExpectedResults    Postion should be restricted to the duration of the clip. If attempting to play form the end of the file, nothing should
//! play. Return with no error code or KErrNone
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1104-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1105-LP
//!@SYMTestCaseDesc           Set invalid position (below minimum)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            First, set position below the minimum value and check.
//!@SYMTestExpectedResults    Postion should be restricted to zero.Return with no error code or KErrNone
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1105-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1106-LP
//!@SYMTestCaseDesc           Set invalid balance (above maximum)
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set balance to an invalid balance value. Set balance above the maximum value and check.
//!@SYMTestExpectedResults    Balance set to maximum value (100). Return with no error code or KErrNone
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1106-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1107-LP
//!@SYMTestCaseDesc           Set invalid balance (below minimum).
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set balance to an invalid balance value. Set balance below the minimum value and check.
//!@SYMTestExpectedResults    Balance set to minimum value. (100) Return with no error code or KErrNone
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1107-LP \audio.ini
TEST_COMPLETE


//!@SYMTestCaseID             MM-MMF-ACLNTOGG-I-1108-LP
//!@SYMTestCaseDesc           Set invalid maximum length of file in bytes and record
//!@SYMREQ                    REQ5481
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           4
//!@SYMTestActions            Set maximum length of file in bytes to a minus value and attempt to record.
//!@SYMTestExpectedResults    Should not record. Return with error code KErrNotSupported
RUN_TEST_STEP 600000 ACLNT MM-MMF-ACLNTOGG-I-1108-LP \audio.ini
TEST_COMPLETE
