sl@0: // sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: // sl@0: //! @file sl@0: //! @SYMTestSuiteName multimedia-mmf-devsound-validation-automated-comb_rr sl@0: //! @SYMScriptTestEnvironment This test script requires a basic ROM. sl@0: // sl@0: // Tests all public elements of the CMMFDevSound sl@0: // classes as a means of confidence that the APIs work as expected. sl@0: // sl@0: // The purpose is to provide a regression test suite of PublishedAll sl@0: // APIs for: CMMFDevSound sl@0: // The tests are fully automated. sl@0: // sl@0: sl@0: sl@0: sl@0: LOAD_SUITE t_devsound sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: START_TESTCASE MULTIMEDIA-MMF-DEVSOUND-VALIDATION-AUTOMATED-COMB_RR-0001 sl@0: sl@0: //!@SYMTestCaseID MULTIMEDIA-MMF-DEVSOUND-VALIDATION-AUTOMATED-COMB_RR-0001 sl@0: //!@SYMAPI sl@0: //! TEST_BLOCK 001 sl@0: //! CMMFDevSound::InitializeL(MDevSoundObserver {ref}, TMMFState ) sl@0: //! CMMFDevSound::SetPrioritySettings(const TMMFPrioritySettings {ref} ) sl@0: //! CMMFDevSound::Capabilities() sl@0: //! CMMFDevSound::SetConfigL(const TMMFCapabilities {ref} ) sl@0: //! CMMFDevSound::PlayInitL() sl@0: //! CMMFDevSound::RecordInitL() sl@0: //! CMMFDevSound::Stop() sl@0: //! sl@0: //! TEST_BLOCK 002 sl@0: //! CMMFDevSound::InitializeL(MDevSoundObserver {ref}, TMMFState ) sl@0: //! CMMFDevSound::SetPrioritySettings(const TMMFPrioritySettings {ref} ) sl@0: //! CMMFDevSound::Capabilities() sl@0: //! CMMFDevSound::SetConfigL(const TMMFCapabilities {ref} ) sl@0: //! CMMFDevSound::RecordInitL() sl@0: //! CMMFDevSound::Stop() sl@0: //! sl@0: //!@SYMAuthor etorres sl@0: //!@SYMCreationDate 7/28/2008 sl@0: //!@SYMTestCaseDesc SIZE Mixing rule - Stop and perform sl@0: //!@SYMTestActions sl@0: //! TEST_BLOCK 001 sl@0: //! 1. Create Devsound instance sl@0: //! 2. Initialize Devsound (Mode = EMMFStateRecording; FourCC = AMR) sl@0: //! 3. Set Priority (Priority = {Priority,PriorityVoiceRecording}; Preference = {PriorityPreference,PriorityPreferenceVoiceRecording} ; PriorityState = EMMFStateRecording) sl@0: //! 4. Capabilities sl@0: //! 5. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz) sl@0: //! 6. ReplaceFile (Filename={drive,mmc}\multimedia\mmf\devsound\Recording\SizeMixingRuleSR.amr) sl@0: //! 7. Record 20 s sl@0: //! 8. Stop 5s sl@0: //! 9. CloseFile sl@0: //! 10. Initialize Devsound (Mode = EMMFStatePlaying; FourCC = AMR) sl@0: //! 11. Set Priority (Priority = {Priority,PriorityAudioPlayback}; Preference = {PriorityPreference,PriorityPreferenceAudioPlayback}; PriorityState = EMMFStatePlaying) sl@0: //! 12. Capabilities sl@0: //! 13. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz) sl@0: //! 14. OpenFile (Filename={drive,mmc}\multimedia\mmf\devsound\Recording\SizeMixingRuleSR.amr) sl@0: //! 15. Play EOF sl@0: //! 16. CloseFile sl@0: //! 17. Delete devsound instance sl@0: //! TEST_BLOCK 002 sl@0: //! 1. Create Devsound instance sl@0: //! 2. Initialize Devsound (Mode = EMMFStateRecording; FourCC = AMR) sl@0: //! 3. Set Priority (Priority = {Priority,PriorityVoiceRecording}; Preference = {PriorityPreference,PriorityPreferenceVoiceRecording} ; PriorityState = EMMFStateRecording) sl@0: //! 4. Capabilities sl@0: //! 5. Set Configuration 10s(Channels = EMMFMono; Rate = EMMFSampleRate8000Hz) sl@0: //! 6. ReplaceFile (Filename={drive,mmc}\multimedia\mmf\devsound\Recording\SizeMixingRuleSR.pcm ) sl@0: //! 7. Record 60 s sl@0: //! 8. Stop sl@0: //! 9. CloseFile sl@0: //! 10. Delete devsound instance sl@0: //!@SYMTestStatus Verified sl@0: //!@SYMTestPriority High sl@0: //!@SYMTestExpectedResults sl@0: //! SIZE Mixing rule - Stop and perform sl@0: //! TEST_BLOCK 001 sl@0: //! AMR record for 20s and playback until EOF sl@0: //! TEST_BLOCK 002 sl@0: //! AMR recording with expected error -21 sl@0: //!@SYMTestType CIT sl@0: sl@0: sl@0: CONCURRENT sl@0: sl@0: sl@0: sl@0: START_TEST_BLOCK 50 t_devsound \multimedia\mmf\devsound\multimedia-mmf-devsound-validation-automated-comb_rr.ini sl@0: CREATE_OBJECT CMMFDevSound devsound1 sl@0: COMMAND devsound1 NewL sl@0: COMMAND devsound1 InitializeL MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0001-InitializeL_command02 sl@0: OUTSTANDING sl@0: COMMAND devsound1 SetPrioritySettings MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0001-SetPrioritySettings_command03 sl@0: COMMAND devsound1 Capabilities sl@0: COMMAND devsound1 SetConfigL MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0001-SetConfigL_command05 sl@0: COMMAND devsound1 ReplaceFile MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0001-ReplaceFile_command06 sl@0: COMMAND devsound1 RecordInitL sl@0: ASYNC_DELAY 20000000 sl@0: COMMAND devsound1 Stop sl@0: DELAY 5000000 sl@0: COMMAND devsound1 CloseFile sl@0: COMMAND devsound1 InitializeL MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0001-InitializeL_command10 sl@0: OUTSTANDING sl@0: COMMAND devsound1 SetPrioritySettings MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0001-SetPrioritySettings_command11 sl@0: COMMAND devsound1 Capabilities sl@0: COMMAND devsound1 SetConfigL MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0001-SetConfigL_command13 sl@0: COMMAND devsound1 OpenFile MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0001-OpenFile_command14 sl@0: COMMAND devsound1 PlayInitL sl@0: OUTSTANDING sl@0: COMMAND devsound1 CloseFile sl@0: COMMAND devsound1 ~ sl@0: END_TEST_BLOCK sl@0: sl@0: sl@0: sl@0: START_TEST_BLOCK 80 t_devsound \multimedia\mmf\devsound\multimedia-mmf-devsound-validation-automated-comb_rr.ini sl@0: CREATE_OBJECT CMMFDevSound devsound1 sl@0: COMMAND devsound1 NewL sl@0: COMMAND devsound1 InitializeL MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0002-InitializeL_command02 sl@0: OUTSTANDING sl@0: COMMAND devsound1 SetPrioritySettings MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0002-SetPrioritySettings_command03 sl@0: COMMAND devsound1 Capabilities sl@0: COMMAND devsound1 SetConfigL MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0002-SetConfigL_command05 sl@0: DELAY 10000000 sl@0: COMMAND devsound1 ReplaceFile MULTIMEDIA-MMF-DevSound-Comb_Rr-0001-0002-ReplaceFile_command06 sl@0: COMMAND !AsyncError=-21 devsound1 RecordInitL sl@0: ASYNC_DELAY 60000000 sl@0: COMMAND devsound1 Stop sl@0: DELAY 2000000 sl@0: COMMAND devsound1 CloseFile sl@0: COMMAND devsound1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE MULTIMEDIA-MMF-DEVSOUND-VALIDATION-AUTOMATED-COMB_RR-0001