// Copyright (c) 2002-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:
//

LOAD_SUITE TSI_MMFACLNT.DLL
#PAUSE_AT_END

# wait for ring.wav to finish playing
delay 1000

###################### POSITIVE TEST ###############

#Req. under test REQ172.1.3.5
# Load and initialise an audio file.
# RUN_UTILS makeReadWrite c:\AclntITestData\mainTst.wav
# RUN_UTILS makeReadWrite c:\AclntITestData\mainTst2.wav
# RUN_UTILS makeReadWrite c:\AclntITestData\main.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-0001-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-0001-CP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.6
# Load and initialise an audio descriptor.
//! @SYMTestCaseID MM-MMF-ACLNT-I-0002-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-0002-CP \audio.ini
TEST_COMPLETE

#Req. none
# Load and initialise an audio descriptor (read-only)
//! @SYMTestCaseID MM-MMF-ACLNT-I-0202-LP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-0202-LP \audio.ini
TEST_COMPLETE

#Req. none
# Load and initialise an audio descriptor (DescOpen)
//! @SYMTestCaseID MM-MMF-ACLNT-I-0302-LP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-0302-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.19
# Open an audio file and play.
//! @SYMTestCaseID MM-MMF-ACLNT-I-2009-HP
RUN_TEST_STEP 10000, ACLNT, MM-MMF-ACLNT-I-2009-HP  \audio.ini
TEST_COMPLETE

# Open a 100Khz audio file and play. (INC023339)
//! @SYMTestCaseID MM-MMF-ACLNT-I-2014-LP
RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-2014-LP  \audio.ini
TEST_COMPLETE

# Open a 7.33Khz audio file and play. (INC023339)
//! @SYMTestCaseID MM-MMF-ACLNT-I-2015-LP
RUN_TEST_STEP 10000, ACLNT, MM-MMF-ACLNT-I-2015-LP  \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.6    REQ172.1.3.8
# Open audio from a descriptor and play.
//! @SYMTestCaseID MM-MMF-ACLNT-I-3009-HP
RUN_TEST_STEP 10000, ACLNT, MM-MMF-ACLNT-I-3009-HP  \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.7    REQ172.1.3.8
# Open audio from a URL.
//! @SYMTestCaseID MM-MMF-ACLNT-I-4001-HP
RUN_TEST_STEP 10000, ACLNT, MM-MMF-ACLNT-I-4001-HP  \audio.ini
TEST_COMPLETE

# Req. none
# Open audio from a URL and play.
//! @SYMTestCaseID MM-MMF-ACLNT-I-4201-LP
RUN_TEST_STEP 10000, ACLNT, MM-MMF-ACLNT-I-4201-LP  \audio.ini
TEST_COMPLETE

#Req. none
# Pause play and continue play.
//! @SYMTestCaseID MM-MMF-ACLNT-I-0213-LP
RUN_TEST_STEP 150000, ACLNT, MM-MMF-ACLNT-I-0213-LP  \audio.ini
TEST_COMPLETE

#Req. none
# Play, pause, play, pause, play.
//! @SYMTestCaseID MM-MMF-ACLNT-I-0214-LP
RUN_TEST_STEP 750000, ACLNT, MM-MMF-ACLNT-I-0214-LP  \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.14    REQ172.1.3.15
# Set and enquire volume.
//! @SYMTestCaseID MM-MMF-ACLNT-I-0014-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-0014-CP \audio.ini
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
TEST_COMPLETE

#Req. under test REQ172.1.3.24   REQ172.1.3.25
# Set and enquire balance.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-0016-LP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-0016-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.13
# Enquire audio duration
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-0018-HP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-0018-HP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.1.1
# Request audio type.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-0024-HP
# RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-0024-HP \audio.ini
# TEST_COMPLETE

#Req. under test  REQ172.1.3.16
#Enquire Maximum volume
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-0030-HP
RUN_TEST_STEP 120000,ACLNT, MM-MMF-ACLNT-I-0030-HP \audio.ini
TEST_COMPLETE

#Req. under test  REQ172.1.3.18
#Get meta information
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-0032-LP
RUN_TEST_STEP 120000,ACLNT, MM-MMF-ACLNT-I-0032-LP \audio.ini
TEST_COMPLETE

#Req. under test  REQ172.1.3.3 REQ172.1.3.4
# Open an audio file, close it then open a new one.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-0033-LP
RUN_TEST_STEP 120000,ACLNT, MM-MMF-ACLNT-I-0033-LP \audio.ini
TEST_COMPLETE

# Currently not supported by the API (06 August 2002) Test not performed for Typhoon.
#Req. under test  REQ172.1.1.1
# Query playback formats.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-0035-LP
# RUN_TEST_STEP 120000,ACLNT, MM-MMF-ACLNT-I-0035-LP  \audio.ini
# TEST_COMPLETE


################  NEGATIVE TESTS ###############

#Req. under test REQ172.1.3.24         REQ172.1.3.25
# Set invalid balance.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-1002-LP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-1002-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.24         REQ172.1.3.25
# Set invalid balance.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-1014-LP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-1014-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.19
# Set invalid play window and attempt to play.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-1004-HP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-1004-HP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.5     REQ172.1.3.8
# Play with no loaded sound file.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-1005-LP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-1005-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.5
# Load unsupported file.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-1007-HP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-1007-HP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.5
# Load file that doesn't exist.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-1008-HP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-1008-HP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.11
# Set invalid audio position and play
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-1015-LP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-1015-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.8
# Audio clip - Delete object before play operation has completed.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-1010-HP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-1010-HP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.5     REQ172.1.3.8
# Open new file while audio player is playing.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-1011-LP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-1011-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.3.6      REQ172.1.3.8
# Play using a corrupt descriptor.
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst.wav
# RUN_UTILS CopyFile c:\AclntITestData\main.wav c:\AclntITestData\mainTst2.wav
//! @SYMTestCaseID MM-MMF-ACLNT-I-1012-LP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-1012-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.3.11
# Playing when position set to the end of the audio.
PRINT <FONT COLOR=RED>TEST MM-MMF-ACLNT-I-1100-LP is commented out as it affects other tests</FONT>
PRINT <FONT COLOR=RED>(Possibly corrupting test data files?)</FONT>
//! @SYMTestCaseID MM-MMF-ACLNT-I-1100-LP
#RUN_TEST_STEP -1, ACLNT, MM-MMF-ACLNT-I-1100-LP \audio.ini


################################################################################
############### Tests for C Cover reprted missing API methods ##################
################################################################################

//! @SYMTestCaseID MM-MMF-ACLNT-I-6020-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6020-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6021-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6021-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6022-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6022-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6023-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6023-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6024-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6024-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6025-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6025-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6026-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6026-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6027-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6027-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6028-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6028-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6029-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6029-CP \audio.ini
TEST_COMPLETE



# INPUT STREAM API
//! @SYMTestCaseID MM-MMF-ACLNT-I-6030-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6030-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6031-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6031-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6032-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6032-CP \audio.ini
TEST_COMPLETE
//! @SYMTestCaseID MM-MMF-ACLNT-I-6034-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6034-CP \audio.ini
TEST_COMPLETE


#For CR1424 For player test(AudioController)

//! @SYMTestCaseID MM-MMF-ACLNT-I-0070-HP
RUN_TEST_STEP 180000,ACLNT, MM-MMF-ACLNT-I-0070-HP  \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-0074-HP
RUN_TEST_STEP 180000,ACLNT, MM-MMF-ACLNT-I-0074-HP  \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-0080-HP
RUN_TEST_STEP 180000,ACLNT, MM-MMF-ACLNT-I-0080-HP  \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-0081-HP
RUN_TEST_STEP 2000000,ACLNT, MM-MMF-ACLNT-I-0081-HP  \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-0088-HP
RUN_TEST_STEP 2000000,ACLNT, MM-MMF-ACLNT-I-0088-HP  \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-0150-HP
RUN_TEST_STEP 180000,ACLNT, MM-MMF-ACLNT-I-0150-HP  \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-0151-HP
RUN_TEST_STEP 180000,ACLNT, MM-MMF-ACLNT-I-0151-HP  \audio.ini
TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-6035-CP
RUN_TEST_STEP 120000, ACLNT, MM-MMF-ACLNT-I-6035-CP \audio.ini
TEST_COMPLETE
