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-devsoundext-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_devsoundext sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: START_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-COMB_RR-0002 sl@0: sl@0: //!@SYMTestCaseID MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-COMB_RR-0002 sl@0: //!@SYMAPI sl@0: //! TEST_BLOCK 001 sl@0: //! CMMFDevSound::InitializeL(MDevSoundObserver{ref}, TFourCC, TMMFState) sl@0: //! CMMFDevSound::SetPrioritySettings(const TMMFPrioritySettings{ref}) sl@0: //! CMMFDevSound::Capabilities() sl@0: //! CMMFDevSound::SetConfigL(const TMMFCapabilities{ref}) sl@0: //! CMMFAudioInput::SetAudioInputL(TAudioInputArray) sl@0: //! CMMFDevSound::RecordInitL() sl@0: //! CMMFDevSound::Stop() sl@0: //! CMMFDevSound::PlayInitL() sl@0: //! TEST_BLOCK 002 sl@0: //! CMMFDevSound::InitializeL(MDevSoundObserver{ref}, TFourCC, TMMFState) sl@0: //! CMMFDevSound::SetPrioritySettings(const TMMFPrioritySettings{ref}) sl@0: //! CMMFDevSound::Capabilities() sl@0: //! CMMFDevSound::SetConfigL(const TMMFCapabilities{ref}) sl@0: //! CMMFDevSound::Pause() sl@0: //! CMMFAudioInput::SetAudioInputL(TAudioInputArray) sl@0: //! CMMFDevSound::RecordInitL() sl@0: //! sl@0: //!@SYMAuthor myanez sl@0: //!@SYMCreationDate 8/25/2008 sl@0: //!@SYMTestCaseDesc HW limitation - Radio recording during voice recording from mic** sl@0: //!@SYMTestActions sl@0: //! TEST_BLOCK 001 sl@0: //! 1. Create DevSound Instance sl@0: //! 2. Create AudioInput Instance (DevSoundInstanceName = devsound1) sl@0: //! 3. Replace File (Filename = {drive,mmc}\multimedia\mmf\devsound\Recording\HwLimitRadioRecDuringMicRec1.amr) sl@0: //! 4. Initialize DevSound (Mode = EMMFStateRecording; FourCC = AMR) sl@0: //! 5. Set Priority (Priority = {Priority,PriorityVoiceRecording}; Preference = {PriorityPreference,PriorityPreferenceVoiceRecording};PriorityState=EMMFStateRecording) sl@0: //! 6. Capabilities sl@0: //! 7. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz) sl@0: //! 8. Set Audio Input (AudioInput = Input_DefaultMic) sl@0: //! 9.Start Record for 20 seconds sl@0: //! 10. Stop for 5 seconds. sl@0: //! 11. Initialize DevSound (Mode = EMMFStatePlaying; FourCC = AMR) sl@0: //! 12. Set Priority (Priority = {Priority,PriorityAudioPlayback}; Preference = {PriorityPreference,PriorityPreferenceAudioPlayback};PriorityState=EMMFStatePlaying) sl@0: //! 13. Capabilities sl@0: //! 14. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz) sl@0: //! 15. Start File Positions sl@0: //! 16. Start Play sl@0: //! 17. Close File sl@0: //! 18. Destroy AudioInput Instance sl@0: //! 19. Destroy DevSound Instance sl@0: //! TEST_BLOCK 002 sl@0: //! 1. Create DevSound Instance sl@0: //! 2. Create AudioInput Instance (DevSoundInstanceName = devsound1) sl@0: //! 3. Replace File (Filename = {drive,mmc}\multimedia\mmf\devsound\Recording\HwLimitRadioRecDuringMicRec2.pcm) sl@0: //! 4. Initialize DevSound (Mode = EMMFStateRecording; FourCC = P16) sl@0: //! 5. Set Priority (Priority = {Priority,PriorityVoiceRecording}; Preference = {PriorityPreference,PriorityPreferenceVoiceRecording};PriorityState=EMMFStateRecording) sl@0: //! 6. Capabilities sl@0: //! 7. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz) sl@0: //! 8. Stop for 10 seconds sl@0: //! 9. Set Audio Input (AudioInput = Input_FMRadio) sl@0: //! 10. Start Record (expected async error=-21) sl@0: //! 11. Close File sl@0: //! 12. Destroy AudioInput Instance sl@0: //! 13. Destroy DevSound Instance sl@0: //!@SYMTestStatus Verified sl@0: //!@SYMTestPriority High sl@0: //!@SYMTestExpectedResults sl@0: //! Radio recording during voice recording from mic sl@0: //! TEST_BLOCK 001 sl@0: //! Record with Voice Recording Priority and Voice Recording Preference; Play with Audio PLayback Priority and Audio PLayback Preference sl@0: //! TEST_BLOCK 002 sl@0: //! Record File with Voice Recording Priority and Voice Recording Preference, Expecting Error -21 sl@0: //!@SYMTestType CIT sl@0: sl@0: sl@0: CONCURRENT sl@0: sl@0: sl@0: sl@0: START_TEST_BLOCK 60 t_devsoundext \multimedia\mmf\devsound\multimedia-mmf-devsoundext-validation-automated-comb_rr.ini sl@0: CREATE_OBJECT CMMFDevSound devsound1 sl@0: CREATE_OBJECT CAudioInput audioinput1 sl@0: COMMAND devsound1 NewL sl@0: COMMAND audioinput1 NewL MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0001-NewL_command02 sl@0: COMMAND devsound1 ReplaceFile MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0001-ReplaceFile_command03 sl@0: COMMAND devsound1 InitializeL MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0001-InitializeL_command04 sl@0: OUTSTANDING sl@0: COMMAND devsound1 SetPrioritySettings MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0001-SetPrioritySettings_command05 sl@0: COMMAND devsound1 Capabilities sl@0: COMMAND devsound1 SetConfigL MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0001-SetConfigL_command07 sl@0: COMMAND audioinput1 SetAudioInput MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0001-SetAudioInput_command08 sl@0: COMMAND devsound1 RecordInitL sl@0: ASYNC_DELAY 20000000 sl@0: COMMAND devsound1 Stop sl@0: DELAY 5000000 sl@0: COMMAND devsound1 InitializeL MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0001-InitializeL_command11 sl@0: OUTSTANDING sl@0: COMMAND devsound1 SetPrioritySettings MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0001-SetPrioritySettings_command12 sl@0: COMMAND devsound1 Capabilities sl@0: COMMAND devsound1 SetConfigL MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0001-SetConfigL_command14 sl@0: COMMAND devsound1 FileStartPosition sl@0: COMMAND devsound1 PlayInitL sl@0: OUTSTANDING sl@0: COMMAND devsound1 CloseFile sl@0: COMMAND audioinput1 ~ sl@0: COMMAND devsound1 ~ sl@0: END_TEST_BLOCK sl@0: sl@0: sl@0: sl@0: START_TEST_BLOCK 80 t_devsoundext \multimedia\mmf\devsound\multimedia-mmf-devsoundext-validation-automated-comb_rr.ini sl@0: CREATE_OBJECT CMMFDevSound devsound1 sl@0: CREATE_OBJECT CAudioInput audioinput1 sl@0: COMMAND devsound1 NewL sl@0: COMMAND audioinput1 NewL MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0002-NewL_command02 sl@0: COMMAND devsound1 ReplaceFile MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0002-ReplaceFile_command03 sl@0: COMMAND devsound1 InitializeL MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0002-InitializeL_command04 sl@0: OUTSTANDING sl@0: COMMAND devsound1 SetPrioritySettings MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0002-SetPrioritySettings_command05 sl@0: COMMAND devsound1 Capabilities sl@0: COMMAND devsound1 SetConfigL MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0002-SetConfigL_command07 sl@0: COMMAND devsound1 Stop sl@0: DELAY 10000000 sl@0: COMMAND audioinput1 SetAudioInput MULTIMEDIA-MMF-DevSoundExt-Com_Rr-0002-0002-SetAudioInput_command09 sl@0: COMMAND !AsyncError=-21 devsound1 RecordInitL sl@0: ASYNC_DELAY 60000000 sl@0: COMMAND devsound1 CloseFile sl@0: COMMAND audioinput1 ~ sl@0: COMMAND devsound1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-COMB_RR-0002