// Copyright (c) 2007-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_a3f_devsound.dll


//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0016
//! @SYMTestCaseDesc			Positive: PCM 48k stereo playback of sine audio data (+ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7918
//! @SYMPREQ					1540
//! @SYMTestActions 			1.	Configure DevSound to play PCM16 raw sine audio data in stereo mode with sampling rate of 48 KHz.
//! 							2.	Start playing and read recorded data from file.
//! 							3.	Stop playback once EOF is reached.
//! @SYMTestExpectedResults 	Devsound to successfully play PCM16 raw sine audio data in stereo mode with sampling rate of 48 KHz with all the DevSound callback functions
//! 							being executed as required throughout the test.

RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0016 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE


//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0018
//! @SYMTestCaseDesc			Negative: PCM mono playback with invalid sample rate (-ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7927
//! @SYMPREQ					1540
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with an invalid sample rate.
//!								2. Verify the valid error code is received
//! @SYMTestExpectedResults		CMMFDevSound::SetConfigL should return with KErrArgument

RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0018 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0019
//! @SYMTestCaseDesc			Negative: PCM 8k playback with invalid channel mode (-ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7927
//! @SYMPREQ					1540
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in an invalid mode with sampling rate of 8 kHz.
//!								2. Verify the valid error code is received
//! @SYMTestExpectedResults		CMMFDevSound::SetConfigL should return with KErrArgument

RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0019 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0020
//! @SYMTestCaseDesc			Negative: PCM 8k mono playback with invalid FourCC (-ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7927
//! @SYMPREQ					1540
//! @SYMTestActions				1. Initialise DevSound with an invalid FourCC code
//!								2. Verify the valid error code is received
//! @SYMTestExpectedResults		CMMFDevSound::InitializeL should return with KErrNotSupported

RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0020 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0021
//! @SYMTestCaseDesc			Negative: PCM 8k mono playback of corrupt file (-ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7927
//! @SYMPREQ					1540
//! @SYMTestStatus
//! @SYMTestActions				1. Configure DevSound to play PCM8 raw audio data in mono mode with sampling rate of 8 kHz.
//!								2. Start playing and read recorded data from file.
//!								3. Stop playback once EOF is reached.
//! @SYMTestExpectedResults		Devsound to successfully play PCM8 audio data in mono mode with sampling rate of 8 KHz with all the DevSound callback functions 
//!								being executed as required throughout the test.

RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0021 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0022
//! @SYMTestCaseDesc			Positive: Play to the EOF a specified number of times (+ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7918
//! @SYMPREQ					1540
//! @SYMTestStatus
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
//!								2. Start playing and read recorded data from file.
//!								3. Stop playback once EOF is reached.
//!								4. Restart playback again
//!								5. Stop test when EOF is reached again
//! @SYMTestExpectedResults		Devsound to successfully play PCM16 audio data in mono mode with sampling rate of 8 KHz twice with all the DevSound callback 
//!								functions being executed as required throughout the test.

RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0022 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0023
//! @SYMTestCaseDesc			Positive: PCM playback with default parameters. Default FourCC input datatype and default config values (+ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7925
//! @SYMPREQ					1540
//! @SYMTestStatus
//! @SYMTestActions				1. Initialise DevSound for playback without specifying format nor configuration parameters
//!								2. Start playing and read recorded data from a PCM16/8 kHz file.
//!								3. Stop playback once EOF is reached.
//! @SYMTestExpectedResults		Devsound to successfully play PCM16 audio data in mono mode with sampling rate of 8 KHz with all the DevSound callback functions 
//!								being executed as required throughout the test.

RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0023 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0024
//! @SYMTestCaseDesc			Positive: Play->Stop->Play->Stop->Play EOF. Stop is called a specified number of times through ini file.
//! 							Last playback continues until the EOF (+ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7919
//! @SYMPREQ					1540
//! @SYMTestStatus
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
//!								2. Start playing and read recorded data from file.
//!								3. Stop playback after 10 seconds.
//!								4. Restart playback
//!								5. Stop playback after 10 seconds.
//!								6. Restart playback
//!								7. Stop playback once EOF is reached.
//! @SYMTestExpectedResults		Devsound to successfully play-stop-play-stop-play PCM16 audio data in mono mode with sampling rate of 8 KHz with all the DevSound callback
//!								functions being executed as required throughout the test.

RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0024 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0025
//! @SYMTestCaseDesc			Positive: Read the current device configuration during playback (+ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ
//! @SYMPREQ					1540
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
//!								2. Start playing and read recorded data from file.
//!								3. In the BuffertoBeFilled callback check the current device configuration matches the one set at the beginning of the test.
//!								4. Stop the test
//! @SYMTestExpectedResults		Values queried during playback should match the ones set before the playback started
RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0025 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0026
//! @SYMTestCaseDesc			Positive: Set volume before play, start play, stop play and get volume (+ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ
//! @SYMPREQ					1540
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
//!								2. Set volume to a value specified in the ini file
//!								3. Start playing and read recorded data from file.
//!								4. Stop playback after 10 seconds and get the volume from DevSound
//!								5. Check the values match
//! @SYMTestExpectedResults		The Volume after the playback has stopped should match the volume set before playback 
RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0026 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0027
//! @SYMTestCaseDesc			Positive: Empty buffers when playback paused (+ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7926
//! @SYMPREQ					1540
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
//!								2. Start playing and read recorded data from file.
//!								3. Pause playback after 10 seconds
//!								4. Call EmptyBuffers while in paused state
//! @SYMTestExpectedResults		EmptyBuffers in paused state should return with KErrNone

RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0027 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
TEST_COMPLETE

