178 ENTRY( "ReSetDownlinkFormat", CTmsAudioServicesTestClass::ReSetDownlinkFormat ), |
177 ENTRY( "ReSetDownlinkFormat", CTmsAudioServicesTestClass::ReSetDownlinkFormat ), |
179 ENTRY( "ReSetUplinkFormat", CTmsAudioServicesTestClass::ReSetUplinkFormat ), |
178 ENTRY( "ReSetUplinkFormat", CTmsAudioServicesTestClass::ReSetUplinkFormat ), |
180 ENTRY( "OpenDownlink", CTmsAudioServicesTestClass::OpenDownlink ), |
179 ENTRY( "OpenDownlink", CTmsAudioServicesTestClass::OpenDownlink ), |
181 ENTRY( "OpenUplink", CTmsAudioServicesTestClass::OpenUplink ), |
180 ENTRY( "OpenUplink", CTmsAudioServicesTestClass::OpenUplink ), |
182 ENTRY( "Gain", CTmsAudioServicesTestClass::Gain ), |
181 ENTRY( "Gain", CTmsAudioServicesTestClass::Gain ), |
183 ENTRY( "AddGlobleGainEffectToStream", CTmsAudioServicesTestClass::AddGlobleGainEffectToStream), |
182 ENTRY( "AddGlobalGainEffectToStream", CTmsAudioServicesTestClass::AddGlobalGainEffectToStream), |
184 ENTRY( "RemoveGlobleGainEffectToStream", CTmsAudioServicesTestClass::RemoveGlobleGainEffectToStream), |
183 ENTRY( "RemoveGlobalGainEffectToStream", CTmsAudioServicesTestClass::RemoveGlobalGainEffectToStream), |
185 ENTRY( "Volume", CTmsAudioServicesTestClass::Volume ), |
184 ENTRY( "Volume", CTmsAudioServicesTestClass::Volume ), |
186 ENTRY( "AddGlobleVolumeEffectToStream", CTmsAudioServicesTestClass::AddGlobleVolumeEffectToStream), |
185 ENTRY( "AddGlobalVolumeEffectToStream", CTmsAudioServicesTestClass::AddGlobalVolumeEffectToStream), |
187 ENTRY( "RemoveGlobleVolumeEffectToStream", CTmsAudioServicesTestClass::RemoveGlobleVolumeEffectToStream), |
186 ENTRY( "RemoveGlobalVolumeEffectToStream", CTmsAudioServicesTestClass::RemoveGlobalVolumeEffectToStream), |
188 ENTRY( "CreateGlobleGainEffect", CTmsAudioServicesTestClass::CreateGlobleGainEffect), |
187 ENTRY( "CreateGlobalGainEffect", CTmsAudioServicesTestClass::CreateGlobalGainEffect), |
189 ENTRY( "Close", CTmsAudioServicesTestClass::Close ), |
188 ENTRY( "Close", CTmsAudioServicesTestClass::Close ), |
190 ENTRY( "Start", CTmsAudioServicesTestClass::Start ), |
189 ENTRY( "Start", CTmsAudioServicesTestClass::Start ), |
191 ENTRY( "Pause", CTmsAudioServicesTestClass::Pause ), |
190 ENTRY( "Pause", CTmsAudioServicesTestClass::Pause ), |
192 ENTRY( "Stop", CTmsAudioServicesTestClass::Stop ), |
191 ENTRY( "Stop", CTmsAudioServicesTestClass::Stop ), |
193 ENTRY( "GetBitRateList", CTmsAudioServicesTestClass::GetBitRateList ), |
192 ENTRY( "GetBitRateList", CTmsAudioServicesTestClass::GetBitRateList ), |
1395 { |
1391 { |
1396 //iRecBufPtr.Set(NULL, 0, 0); |
1392 //iRecBufPtr.Set(NULL, 0, 0); |
1397 iRecBufReady = EFalse; |
1393 iRecBufReady = EFalse; |
1398 //iUpLinkCodec = ENULL; |
1394 //iUpLinkCodec = ENULL; |
1399 iTmsUplink->Deinit(); |
1395 iTmsUplink->Deinit(); |
|
1396 iTmsUplink->RemoveObserver(*this); |
1400 iUpLinkStatus = UNINITIALIZED; |
1397 iUpLinkStatus = UNINITIALIZED; |
1401 iLog->Log(_L("Close Uplink")); |
1398 iLog->Log(_L("Close Uplink")); |
1402 AddExpectedEvent(EUplinkClosed, KMediumTimeout); |
1399 AddExpectedEvent(EUplinkClosed, KMediumTimeout); |
1403 } |
1400 } |
1404 else if (closeType == KTagDnlink) |
1401 else if (closeType == KTagDnlink) |
1405 { |
1402 { |
1406 //iPlayBufPtr.Set(NULL, 0, 0); |
1403 //iPlayBufPtr.Set(NULL, 0, 0); |
1407 iTmsDnlink->Deinit(); |
1404 iTmsDnlink->Deinit(); |
|
1405 iTmsDnlink->RemoveObserver(*this); |
1408 iDnLinkStatus = UNINITIALIZED; |
1406 iDnLinkStatus = UNINITIALIZED; |
1409 iPlayBufReady = EFalse; |
1407 iPlayBufReady = EFalse; |
1410 // iDnLinkCodec = ENULL; |
1408 // iDnLinkCodec = ENULL; |
1411 iLog->Log(_L("Close Dnlink")); |
1409 iLog->Log(_L("Close Dnlink")); |
1412 AddExpectedEvent(EDownlinkClosed, KMediumTimeout); |
1410 AddExpectedEvent(EDownlinkClosed, KMediumTimeout); |
1589 aItem.GetNextInt(effecttype); |
1587 aItem.GetNextInt(effecttype); |
1590 |
1588 |
1591 if (effecttype == TMS_EFFECT_GAIN) |
1589 if (effecttype == TMS_EFFECT_GAIN) |
1592 { |
1590 { |
1593 RDebug::Printf("[TMS STIF] GAIN, GetMaxLevel"); |
1591 RDebug::Printf("[TMS STIF] GAIN, GetMaxLevel"); |
1594 ret = static_cast<TMSGainEffect*>(iTmsUplinkEffect)->GetMaxLevel( |
1592 ret = static_cast<TMSGainEffect*> (iTmsUplinkEffect)->GetMaxLevel( |
1595 iMaxGain); |
1593 iMaxGain); |
1596 RDebug::Printf("[TMS STIF] GAIN, GetMaxLevel Level [%d] Ret Err [%d]", iMaxGain, ret); |
1594 RDebug::Printf("[TMS STIF] GAIN, GetMaxLevel Level [%d] Ret Err [%d]", iMaxGain, ret); |
1597 RDebug::Printf("[TMS STIF] GAIN, SetLevel to [%d]", iMaxGain); |
1595 RDebug::Printf("[TMS STIF] GAIN, SetLevel to [%d]", iMaxGain); |
1598 ret = static_cast<TMSGainEffect*>(iTmsUplinkEffect)->SetLevel(iMaxGain); |
1596 ret = static_cast<TMSGainEffect*>(iTmsUplinkEffect)->SetLevel(iMaxGain); |
1599 RDebug::Printf("[TMS STIF] GAIN, SetLevel ret [%d]", ret); |
1597 RDebug::Printf("[TMS STIF] GAIN, SetLevel ret [%d]", ret); |
1600 iLog->Log(_L("SetMaxGain: %d"), iMaxGain); |
1598 iLog->Log(_L("SetMaxGain: %d"), iMaxGain); |
1601 RDebug::Printf("[TMS STIF] GAIN, GetLevel"); |
1599 RDebug::Printf("[TMS STIF] GAIN, GetLevel"); |
1602 ret = static_cast<TMSGainEffect*>(iTmsUplinkEffect)->GetLevel(iGain); |
1600 ret = static_cast<TMSGainEffect*> (iTmsUplinkEffect)->GetLevel(iGain); |
1603 RDebug::Printf("[TMS STIF] GAIN, Exp Level [%d] Ret Level [%d] Ret Err [%d]", iMaxGain, iGain, ret); |
1601 RDebug::Printf("[TMS STIF] GAIN, Exp Level [%d] Ret Level [%d] Ret Err [%d]", iMaxGain, iGain, ret); |
1604 if (iGain != iMaxGain) |
1602 if (iGain != iMaxGain) |
1605 { |
1603 { |
1606 iLog->Log(_L("GetGain doesn't return expected MaxGain!!! returned Gain = %d"), iGain); |
1604 iLog->Log(_L("GetGain doesn't return expected MaxGain!!! returned Gain = %d"), iGain); |
1607 return KErrUnexpectedValue; |
1605 return KErrUnexpectedValue; |
1608 } |
1606 } |
1609 |
1607 |
1610 static_cast<TMSGainEffect*>(iTmsUplinkEffect)->SetLevel(0); |
1608 static_cast<TMSGainEffect*> (iTmsUplinkEffect)->SetLevel(0); |
1611 iLog->Log(_L("MuteMic")); |
1609 iLog->Log(_L("MuteMic")); |
1612 static_cast<TMSGainEffect*>(iTmsUplinkEffect)->GetLevel(iGain); |
1610 static_cast<TMSGainEffect*> (iTmsUplinkEffect)->GetLevel(iGain); |
1613 |
1611 |
1614 if (iGain != 0) |
1612 if (iGain != 0) |
1615 { |
1613 { |
1616 iLog->Log(_L("GetGain does not return expected Mute value!!! returned Gain = %d"), iGain); |
1614 iLog->Log(_L("GetGain does not return expected Mute value!!! returned Gain = %d"), iGain); |
1617 return KErrUnexpectedValue; |
1615 return KErrUnexpectedValue; |
1618 } |
1616 } |
1619 } |
1617 } |
1620 else if (effecttype == TMS_EFFECT_GLOBAL_GAIN) |
1618 else if (effecttype == TMS_EFFECT_GLOBAL_GAIN) |
1621 { |
1619 { |
1622 RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetMaxLevel"); |
1620 RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetMaxLevel"); |
1623 ret = static_cast<TMSGlobalGainEffect*>(iGlobalGain)->GetMaxLevel( |
1621 ret = static_cast<TMSGlobalGainEffect*> (iGlobalGain)->GetMaxLevel( |
1624 iMaxGain); |
1622 iMaxGain); |
1625 RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetMaxLevel Level [%d] Ret Err [%d]", iMaxGain, ret); |
1623 RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetMaxLevel Level [%d] Ret Err [%d]", iMaxGain, ret); |
1626 RDebug::Printf("[TMS STIF] GLOBAL GAIN, SetLevel to [%d]", iMaxGain); |
1624 RDebug::Printf("[TMS STIF] GLOBAL GAIN, SetLevel to [%d]", iMaxGain); |
1627 ret = static_cast<TMSGlobalGainEffect*>(iGlobalGain)->SetLevel( |
1625 ret = static_cast<TMSGlobalGainEffect*> (iGlobalGain)->SetLevel( |
1628 iMaxGain); |
1626 iMaxGain); |
1629 RDebug::Printf("[TMS STIF] GLOBAL GAIN, SetLevel ret [%d]", ret); |
1627 RDebug::Printf("[TMS STIF] GLOBAL GAIN, SetLevel ret [%d]", ret); |
1630 iLog->Log(_L("SetGlobleMaxGain: %d"), iMaxGain); |
1628 iLog->Log(_L("SetGlobalMaxGain: %d"), iMaxGain); |
1631 RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetLevel"); |
1629 RDebug::Printf("[TMS STIF] GLOBAL GAIN, GetLevel"); |
1632 ret = static_cast<TMSGlobalGainEffect*>(iGlobalGain)->GetLevel(iGain); |
1630 ret = static_cast<TMSGlobalGainEffect*>(iGlobalGain)->GetLevel(iGain); |
1633 RDebug::Printf("[TMS STIF] GLOBAL GAIN, Exp Level [%d] Ret Level [%d] Ret Err [%d]", iMaxGain, iGain, ret); |
1631 RDebug::Printf("[TMS STIF] GLOBAL GAIN, Exp Level [%d] Ret Level [%d] Ret Err [%d]", iMaxGain, iGain, ret); |
1634 if (iGain != iMaxGain) |
1632 if (iGain != iMaxGain) |
1635 { |
1633 { |
1636 iLog->Log(_L("GetGain doesn't return expected Globle MaxGain!!! returned Gain = %d"), iGain); |
1634 iLog->Log(_L("GetGain doesn't return expected Global MaxGain!!! returned Gain = %d"), iGain); |
1637 return KErrUnexpectedValue; |
1635 return KErrUnexpectedValue; |
1638 } |
1636 } |
1639 |
1637 |
1640 static_cast<TMSGlobalGainEffect*>(iGlobalGain)->SetLevel(0); |
1638 static_cast<TMSGlobalGainEffect*> (iGlobalGain)->SetLevel(0); |
1641 iLog->Log(_L("MuteMic")); |
1639 iLog->Log(_L("MuteMic")); |
1642 static_cast<TMSGlobalGainEffect*>(iGlobalGain)->GetLevel(iGain); |
1640 static_cast<TMSGlobalGainEffect*> (iGlobalGain)->GetLevel(iGain); |
1643 |
1641 |
1644 if (iGain != 0) |
1642 if (iGain != 0) |
1645 { |
1643 { |
1646 iLog->Log(_L("GetGain does not return expected loble Mute value!!! returned Gain = %d"), iGain); |
1644 iLog->Log(_L("GetGain does not return expected loble Mute value!!! returned Gain = %d"), iGain); |
1647 return KErrUnexpectedValue; |
1645 return KErrUnexpectedValue; |
1663 aItem.GetNextInt(effecttype); |
1661 aItem.GetNextInt(effecttype); |
1664 |
1662 |
1665 if (effecttype == TMS_EFFECT_VOLUME) |
1663 if (effecttype == TMS_EFFECT_VOLUME) |
1666 { |
1664 { |
1667 RDebug::Printf("[TMS STIF] Volume, GetMaxLevel"); |
1665 RDebug::Printf("[TMS STIF] Volume, GetMaxLevel"); |
1668 ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->GetMaxLevel( |
1666 ret = static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->GetMaxLevel( |
1669 iMaxVolume); |
1667 iMaxVolume); |
1670 RDebug::Printf("[TMS STIF] MaxLevel [%d] Ret Error [%d]", iMaxVolume, ret); |
1668 RDebug::Printf("[TMS STIF] MaxLevel [%d] Ret Error [%d]", iMaxVolume, ret); |
1671 RDebug::Printf("[TMS STIF] Volume, SetLevel to MaxLevel [%d]", iMaxVolume); |
1669 RDebug::Printf("[TMS STIF] Volume, SetLevel to MaxLevel [%d]", iMaxVolume); |
1672 ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->SetLevel( |
1670 ret = static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->SetLevel( |
1673 iMaxVolume); |
1671 iMaxVolume); |
1674 RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret); |
1672 RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret); |
1675 iLog->Log(_L("SetMaxVolume: %d"), iMaxVolume); |
1673 iLog->Log(_L("SetMaxVolume: %d"), iMaxVolume); |
1676 RDebug::Printf("[TMS STIF] GetLevel"); |
1674 RDebug::Printf("[TMS STIF] GetLevel"); |
1677 ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->GetLevel( |
1675 ret = static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->GetLevel( |
1678 iVolume); |
1676 iVolume); |
1679 RDebug::Printf("[TMS STIF] Level [%d] Ret Error [%d]", iVolume, ret); |
1677 RDebug::Printf("[TMS STIF] Level [%d] Ret Error [%d]", iVolume, ret); |
1680 if (iVolume != iMaxVolume) |
1678 if (iVolume != iMaxVolume) |
1681 { |
1679 { |
1682 iLog->Log(_L("GetVolume doesn't return expected MaxVolume!!! returned Volume = %d"), iVolume); |
1680 iLog->Log(_L("GetVolume doesn't return expected MaxVolume!!! returned Volume = %d"), iVolume); |
1683 return KErrUnexpectedValue; |
1681 return KErrUnexpectedValue; |
1684 } |
1682 } |
1685 |
1683 |
1686 RDebug::Printf("[TMS STIF] Volume, SetLevel to 0 "); |
1684 RDebug::Printf("[TMS STIF] Volume, SetLevel to 0 "); |
1687 ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->SetLevel(0); |
1685 ret = static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->SetLevel(0); |
1688 RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret); |
1686 RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret); |
1689 iLog->Log(_L("Mute Volume")); |
1687 iLog->Log(_L("Mute Volume")); |
1690 ret = static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->GetLevel( |
1688 ret = static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->GetLevel( |
1691 iVolume); |
1689 iVolume); |
1692 RDebug::Printf("[TMS STIF] Level [%d] Ret Error [%d]", iVolume, ret); |
1690 RDebug::Printf("[TMS STIF] Level [%d] Ret Error [%d]", iVolume, ret); |
1693 if (iVolume != 0) |
1691 if (iVolume != 0) |
1694 { |
1692 { |
1695 iLog->Log(_L("GetVolume does not return expected Mute value!!! returned Volume = %d"), iVolume); |
1693 iLog->Log(_L("GetVolume does not return expected Mute value!!! returned Volume = %d"), iVolume); |
1697 } |
1695 } |
1698 } |
1696 } |
1699 else if (effecttype == TMS_EFFECT_GLOBAL_VOL) |
1697 else if (effecttype == TMS_EFFECT_GLOBAL_VOL) |
1700 { |
1698 { |
1701 RDebug::Printf("[TMS STIF] GLOBAL_VOL, Get Current Level"); |
1699 RDebug::Printf("[TMS STIF] GLOBAL_VOL, Get Current Level"); |
1702 ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetLevel(iVolume); |
1700 ret = static_cast<TMSGlobalVolEffect*> (iGlobalVol)->GetLevel(iVolume); |
1703 RDebug::Printf("[TMS STIF] Current Vol Level [%d] Ret Error [%d]", iVolume, ret); |
1701 RDebug::Printf("[TMS STIF] Current Vol Level [%d] Ret Error [%d]", iVolume, ret); |
1704 RDebug::Printf("[TMS STIF] GLOBAL_VOL, GetMaxLevel"); |
1702 RDebug::Printf("[TMS STIF] GLOBAL_VOL, GetMaxLevel"); |
1705 ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetMaxLevel( |
1703 ret = static_cast<TMSGlobalVolEffect*> (iGlobalVol)->GetMaxLevel( |
1706 iMaxVolume); |
1704 iMaxVolume); |
1707 RDebug::Printf("[TMS STIF] MaxLevel [%d] Ret Error [%d]", iMaxVolume, ret); |
1705 RDebug::Printf("[TMS STIF] MaxLevel [%d] Ret Error [%d]", iMaxVolume, ret); |
1708 RDebug::Printf("[TMS STIF] GLOBAL_VOL, SetLevel to [%d]", iMaxVolume); |
1706 RDebug::Printf("[TMS STIF] GLOBAL_VOL, SetLevel to [%d]", iMaxVolume); |
1709 ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->SetLevel( |
1707 ret = static_cast<TMSGlobalVolEffect*> (iGlobalVol)->SetLevel( |
1710 iMaxVolume); |
1708 iMaxVolume); |
1711 RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret); |
1709 RDebug::Printf("[TMS STIF] SetLevel Ret Error [%d]", ret); |
1712 iLog->Log(_L("SetMaxGlobleVolume: %d"), iMaxVolume); |
1710 iLog->Log(_L("SetMaxGlobalVolume: %d"), iMaxVolume); |
1713 RDebug::Printf("[TMS STIF] GLOBAL_VOL,GetLevel"); |
1711 RDebug::Printf("[TMS STIF] GLOBAL_VOL,GetLevel"); |
1714 ret = static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetLevel(iVolume); |
1712 ret = static_cast<TMSGlobalVolEffect*> (iGlobalVol)->GetLevel(iVolume); |
1715 RDebug::Printf("[TMS STIF] Expected Level [%d] Ret Level [%d] Ret Error [%d]", iMaxVolume, iVolume, ret); |
1713 RDebug::Printf("[TMS STIF] Expected Level [%d] Ret Level [%d] Ret Error [%d]", iMaxVolume, iVolume, ret); |
1716 iLog->Log(_L("GetMaxGlobleVolume: %d"), iVolume); |
1714 iLog->Log(_L("GetMaxGlobalVolume: %d"), iVolume); |
1717 if (iVolume != iMaxVolume) |
1715 if (iVolume != iMaxVolume) |
1718 { |
1716 { |
1719 iLog->Log(_L("GetGlobleVolume doesn't return expected MaxVolume!!! returned Volume = %d"), iVolume); |
1717 iLog->Log(_L("GetGlobalVolume doesn't return expected MaxVolume!!! returned Volume = %d"), iVolume); |
1720 return KErrUnexpectedValue; |
1718 return KErrUnexpectedValue; |
1721 } |
1719 } |
1722 |
1720 |
1723 static_cast<TMSGlobalVolEffect*>(iGlobalVol)->SetLevel(0); |
1721 static_cast<TMSGlobalVolEffect*> (iGlobalVol)->SetLevel(0); |
1724 iLog->Log(_L("Mute Globle Volume")); |
1722 iLog->Log(_L("Mute Global Volume")); |
1725 static_cast<TMSGlobalVolEffect*>(iGlobalVol)->GetLevel(iVolume); |
1723 static_cast<TMSGlobalVolEffect*> (iGlobalVol)->GetLevel(iVolume); |
1726 |
1724 |
1727 if (iVolume != 0) |
1725 if (iVolume != 0) |
1728 { |
1726 { |
1729 iLog->Log(_L("GetGlobleVolume does not return expected Mute value!!! returned Volume = %d"), iVolume); |
1727 iLog->Log(_L("GetGlobalVolume does not return expected Mute value!!! returned Volume = %d"), iVolume); |
1730 return KErrUnexpectedValue; |
1728 return KErrUnexpectedValue; |
1731 } |
1729 } |
1732 } |
1730 } |
1733 else |
1731 else |
1734 { |
1732 { |
2396 { |
2401 { |
2397 if ((linkType == KTagUplink) && (iUpLinkCodec == TMS_FORMAT_G711) |
2402 if ((linkType == KTagUplink) && (iUpLinkCodec == TMS_FORMAT_G711) |
2398 && (mode == KTagALaw)) |
2403 && (mode == KTagALaw)) |
2399 { |
2404 { |
2400 iLog->Log(_L("UPL Mode Set: aLaw")); |
2405 iLog->Log(_L("UPL Mode Set: aLaw")); |
2401 static_cast<TMSG711Format*>(iTmsFormatUp)->SetMode( |
2406 static_cast<TMSG711Format*> (iTmsFormatUp)->SetMode( |
2402 TMS_G711_CODEC_MODE_ALAW); |
2407 TMS_G711_CODEC_MODE_ALAW); |
2403 } |
2408 } |
2404 else if ((linkType == KTagUplink) |
2409 else if ((linkType == KTagUplink) |
2405 && (iUpLinkCodec == TMS_FORMAT_G711) && (mode == KTagULaw)) |
2410 && (iUpLinkCodec == TMS_FORMAT_G711) && (mode == KTagULaw)) |
2406 { |
2411 { |
2407 iLog->Log(_L("UPL Mode Set: uLaw")); |
2412 iLog->Log(_L("UPL Mode Set: uLaw")); |
2408 static_cast<TMSG711Format*>(iTmsFormatUp)->SetMode( |
2413 static_cast<TMSG711Format*> (iTmsFormatUp)->SetMode( |
2409 TMS_G711_CODEC_MODE_MULAW); |
2414 TMS_G711_CODEC_MODE_MULAW); |
2410 } |
2415 } |
2411 else if ((linkType == KTagUplink) |
2416 else if ((linkType == KTagUplink) |
2412 && (iUpLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag20ms)) |
2417 && (iUpLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag20ms)) |
2413 { |
2418 { |
2414 iLog->Log(_L("UPL Mode Set: 20ms frame")); |
2419 iLog->Log(_L("UPL Mode Set: 20ms frame")); |
2415 static_cast<TMSILBCFormat*>(iTmsFormatUp)->SetMode( |
2420 static_cast<TMSILBCFormat*> (iTmsFormatUp)->SetMode( |
2416 TMS_ILBC_CODEC_MODE_20MS_FRAME); |
2421 TMS_ILBC_CODEC_MODE_20MS_FRAME); |
2417 } |
2422 } |
2418 else if ((linkType == KTagUplink) |
2423 else if ((linkType == KTagUplink) |
2419 && (iUpLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag30ms)) |
2424 && (iUpLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag30ms)) |
2420 { |
2425 { |
2421 iLog->Log(_L("UPL Mode Set: 30ms frame")); |
2426 iLog->Log(_L("UPL Mode Set: 30ms frame")); |
2422 static_cast<TMSILBCFormat*>(iTmsFormatUp)->SetMode( |
2427 static_cast<TMSILBCFormat*> (iTmsFormatUp)->SetMode( |
2423 TMS_ILBC_CODEC_MODE_30MS_FRAME); |
2428 TMS_ILBC_CODEC_MODE_30MS_FRAME); |
2424 } |
2429 } |
2425 else if ((linkType == KTagDnlink) |
2430 else if ((linkType == KTagDnlink) |
2426 && (iDnLinkCodec == TMS_FORMAT_G711) && (mode == KTagALaw)) |
2431 && (iDnLinkCodec == TMS_FORMAT_G711) && (mode == KTagALaw)) |
2427 { |
2432 { |
2428 iLog->Log(_L("DNL Mode Set: aLaw")); |
2433 iLog->Log(_L("DNL Mode Set: aLaw")); |
2429 static_cast<TMSG711Format*>(iTmsFormatDn)->SetMode( |
2434 static_cast<TMSG711Format*> (iTmsFormatDn)->SetMode( |
2430 TMS_G711_CODEC_MODE_ALAW); |
2435 TMS_G711_CODEC_MODE_ALAW); |
2431 } |
2436 } |
2432 else if ((linkType == KTagDnlink) |
2437 else if ((linkType == KTagDnlink) |
2433 && (iDnLinkCodec == TMS_FORMAT_G711) && (mode == KTagULaw)) |
2438 && (iDnLinkCodec == TMS_FORMAT_G711) && (mode == KTagULaw)) |
2434 { |
2439 { |
2435 iLog->Log(_L("DNL Mode Set: uLaw")); |
2440 iLog->Log(_L("DNL Mode Set: uLaw")); |
2436 static_cast<TMSG711Format*>(iTmsFormatDn)->SetMode( |
2441 static_cast<TMSG711Format*> (iTmsFormatDn)->SetMode( |
2437 TMS_G711_CODEC_MODE_MULAW); |
2442 TMS_G711_CODEC_MODE_MULAW); |
2438 } |
2443 } |
2439 else if ((linkType == KTagDnlink) |
2444 else if ((linkType == KTagDnlink) |
2440 && (iDnLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag20ms)) |
2445 && (iDnLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag20ms)) |
2441 { |
2446 { |
2442 iLog->Log(_L("DNL Mode Set: 20ms frame")); |
2447 iLog->Log(_L("DNL Mode Set: 20ms frame")); |
2443 static_cast<TMSILBCFormat*>(iTmsFormatDn)->SetMode( |
2448 static_cast<TMSILBCFormat*> (iTmsFormatDn)->SetMode( |
2444 TMS_ILBC_CODEC_MODE_20MS_FRAME); |
2449 TMS_ILBC_CODEC_MODE_20MS_FRAME); |
2445 } |
2450 } |
2446 else if ((linkType == KTagDnlink) |
2451 else if ((linkType == KTagDnlink) |
2447 && (iDnLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag30ms)) |
2452 && (iDnLinkCodec == TMS_FORMAT_ILBC) && (mode == KTag30ms)) |
2448 { |
2453 { |
2449 iLog->Log(_L("DNL Mode Set: 30ms frame")); |
2454 iLog->Log(_L("DNL Mode Set: 30ms frame")); |
2450 static_cast<TMSILBCFormat*>(iTmsFormatDn)->SetMode( |
2455 static_cast<TMSILBCFormat*> (iTmsFormatDn)->SetMode( |
2451 TMS_ILBC_CODEC_MODE_30MS_FRAME); |
2456 TMS_ILBC_CODEC_MODE_30MS_FRAME); |
2452 } |
2457 } |
2453 else |
2458 else |
2454 { |
2459 { |
2455 iLog->Log(KMsgBadTestParameters); |
2460 iLog->Log(KMsgBadTestParameters); |
2487 return error; |
2492 return error; |
2488 } |
2493 } |
2489 |
2494 |
2490 TInt CTmsAudioServicesTestClass::ToggleCNG(CStifItemParser & /*aItem*/) |
2495 TInt CTmsAudioServicesTestClass::ToggleCNG(CStifItemParser & /*aItem*/) |
2491 { |
2496 { |
2492 |
|
2493 iLog ->Log(_L("CTmsAudioServicesTestClass::ToggleCNG")); |
2497 iLog ->Log(_L("CTmsAudioServicesTestClass::ToggleCNG")); |
2494 TInt error = KErrNone; |
2498 TInt error = KErrNone; |
2495 iCng = (iCng) ? EFalse : ETrue; |
2499 iCng = (iCng) ? EFalse : ETrue; |
2496 switch (iDnLinkCodec) |
2500 switch (iDnLinkCodec) |
2497 { |
2501 { |
2498 case TMS_FORMAT_G711: |
2502 case TMS_FORMAT_G711: |
2499 static_cast<TMSG711Format*>(iTmsFormatDn)->SetCNG(iCng); |
2503 static_cast<TMSG711Format*> (iTmsFormatDn)->SetCNG(iCng); |
2500 iLog->Log(_L("CNG set: %d"), iCng); |
2504 iLog->Log(_L("CNG set: %d"), iCng); |
2501 break; |
2505 break; |
2502 case TMS_FORMAT_ILBC: |
2506 case TMS_FORMAT_ILBC: |
2503 static_cast<TMSILBCFormat*>(iTmsFormatDn)->SetCNG(iCng); |
2507 static_cast<TMSILBCFormat*> (iTmsFormatDn)->SetCNG(iCng); |
2504 iLog->Log(_L("CNG set: %d"), iCng); |
2508 iLog->Log(_L("CNG set: %d"), iCng); |
2505 break; |
2509 break; |
2506 default: |
2510 default: |
2507 break; |
2511 break; |
2508 } |
2512 } |
2764 if (iFactory && iTmsDnlink && !iTmsDnlinkEffect) |
2765 if (iFactory && iTmsDnlink && !iTmsDnlinkEffect) |
2765 { |
2766 { |
2766 status = iFactory->CreateEffect(TMS_EFFECT_VOLUME, iTmsDnlinkEffect); |
2767 status = iFactory->CreateEffect(TMS_EFFECT_VOLUME, iTmsDnlinkEffect); |
2767 if (status == KErrNone) |
2768 if (status == KErrNone) |
2768 { |
2769 { |
2769 static_cast<TMSVolumeEffect*>(iTmsDnlinkEffect)->AddObserver(*this, |
2770 static_cast<TMSVolumeEffect*> (iTmsDnlinkEffect)->AddObserver( |
2770 NULL); |
2771 *this, NULL); |
2771 } |
2772 } |
2772 } |
2773 } |
2773 RDebug::Printf("[TMS STIF] CreateVolumeEffect Return [%d]", status); |
2774 RDebug::Printf("[TMS STIF] CreateVolumeEffect Return [%d]", status); |
2774 return status; |
2775 return status; |
2775 } |
2776 } |
2776 |
2777 |
2777 gint CTmsAudioServicesTestClass::CreateVolumeGlobleEffect() |
2778 gint CTmsAudioServicesTestClass::CreateVolumeGlobalEffect() |
2778 { |
2779 { |
2779 iLog->Log(_L("CTmsAudioServicesTestClass::CreateVolumeGlobleEffect")); |
2780 iLog->Log(_L("CTmsAudioServicesTestClass::CreateVolumeGlobalEffect")); |
2780 gint status(KErrNone); |
2781 gint status(KErrNone); |
2781 if (iFactory && !iGlobalVol) |
2782 if (iFactory && !iGlobalVol) |
2782 { |
2783 { |
2783 status = iFactory->CreateEffect(TMS_EFFECT_GLOBAL_VOL, iGlobalVol); |
2784 status = iFactory->CreateEffect(TMS_EFFECT_GLOBAL_VOL, iGlobalVol); |
2784 |
|
2785 if (status == KErrNone) |
2785 if (status == KErrNone) |
2786 { |
2786 { |
2787 static_cast<TMSGlobalVolEffect*>(iGlobalVol)->AddObserver(*this, |
2787 static_cast<TMSGlobalVolEffect*> (iGlobalVol)->AddObserver(*this, |
2788 NULL); |
2788 NULL); |
2789 iLog->Log(_L("CTmsAudioServicesTestClass::CreateVolumeGlobleEffect - AddObserver")); |
2789 iLog->Log(_L("CTmsAudioServicesTestClass::CreateVolumeGlobalEffect - AddObserver")); |
2790 } |
2790 } |
2791 } |
2791 } |
2792 RDebug::Printf("[TMS STIF] CreateVolumeGlobleEffect Return [%d]", status); |
2792 RDebug::Printf("[TMS STIF] CreateVolumeGlobalEffect Return [%d]", status); |
2793 return status; |
2793 return status; |
2794 } |
2794 } |
2795 |
2795 |
2796 TInt CTmsAudioServicesTestClass::AddVolumeEffectToStream( |
2796 TInt CTmsAudioServicesTestClass::AddVolumeEffectToStream( |
2797 CStifItemParser& /*aItem*/) |
2797 CStifItemParser& /*aItem*/) |
2803 error = iTmsDnlink->AddEffect(iTmsDnlinkEffect); |
2803 error = iTmsDnlink->AddEffect(iTmsDnlinkEffect); |
2804 } |
2804 } |
2805 return error; |
2805 return error; |
2806 } |
2806 } |
2807 |
2807 |
2808 TInt CTmsAudioServicesTestClass::AddGlobleVolumeEffectToStream( |
2808 TInt CTmsAudioServicesTestClass::AddGlobalVolumeEffectToStream( |
2809 CStifItemParser& /*aItem*/) |
2809 CStifItemParser& /*aItem*/) |
2810 { |
2810 { |
2811 iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobleVolumeEffectToStream")); |
2811 iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobalVolumeEffectToStream")); |
2812 TInt error = KErrNone; |
2812 TInt error = KErrNone; |
2813 if (iTmsDnlink && iGlobalVol) |
2813 if (iTmsDnlink && iGlobalVol) |
2814 { |
2814 { |
2815 error = iTmsDnlink->AddEffect(iGlobalVol); |
2815 error = iTmsDnlink->AddEffect(iGlobalVol); |
2816 } |
2816 } |
2817 return error; |
2817 return error; |
2818 } |
2818 } |
2819 |
2819 |
2820 TInt CTmsAudioServicesTestClass::RemoveGlobleVolumeEffectToStream( |
2820 TInt CTmsAudioServicesTestClass::RemoveGlobalVolumeEffectToStream( |
2821 CStifItemParser& /*aItem*/) |
2821 CStifItemParser& /*aItem*/) |
2822 { |
2822 { |
2823 iLog->Log(_L("CTmsAudioServicesTestClass::RemoveGlobleVolumeEffectToStream")); |
2823 iLog->Log(_L("CTmsAudioServicesTestClass::RemoveGlobalVolumeEffectToStream")); |
2824 TInt error = KErrNone; |
2824 TInt error = KErrNone; |
2825 if (iTmsDnlink && iGlobalVol) |
2825 if (iTmsDnlink && iGlobalVol) |
2826 { |
2826 { |
2827 error = iTmsDnlink->RemoveEffect(iGlobalVol); |
2827 error = iTmsDnlink->RemoveEffect(iGlobalVol); |
2828 } |
2828 } |
2837 if (iFactory && iTmsUplink && !iTmsUplinkEffect) |
2837 if (iFactory && iTmsUplink && !iTmsUplinkEffect) |
2838 { |
2838 { |
2839 status = iFactory->CreateEffect(TMS_EFFECT_GAIN, iTmsUplinkEffect); |
2839 status = iFactory->CreateEffect(TMS_EFFECT_GAIN, iTmsUplinkEffect); |
2840 if (status == KErrNone) |
2840 if (status == KErrNone) |
2841 { |
2841 { |
2842 static_cast<TMSGainEffect*>(iTmsUplinkEffect)->AddObserver(*this, |
2842 static_cast<TMSGainEffect*> (iTmsUplinkEffect)->AddObserver( |
2843 NULL); |
2843 *this, NULL); |
2844 } |
2844 } |
2845 } |
2845 } |
2846 RDebug::Printf("[TMS STIF] CreateGainEffect Return [%d]", status); |
2846 RDebug::Printf("[TMS STIF] CreateGainEffect Return [%d]", status); |
2847 return status; |
2847 return status; |
2848 } |
2848 } |
2849 |
2849 |
2850 gint CTmsAudioServicesTestClass::CreateGlobleGainEffect() |
2850 gint CTmsAudioServicesTestClass::CreateGlobalGainEffect() |
2851 { |
2851 { |
2852 iLog->Log(_L("CTmsAudioServicesTestClass::CreateGlobleGainEffect")); |
2852 iLog->Log(_L("CTmsAudioServicesTestClass::CreateGlobalGainEffect")); |
2853 gint status(KErrNone); |
2853 gint status(KErrNone); |
2854 if (iFactory && !iGlobalGain) |
2854 if (iFactory && !iGlobalGain) |
2855 { |
2855 { |
2856 status = iFactory->CreateEffect(TMS_EFFECT_GLOBAL_GAIN, iGlobalGain); |
2856 status = iFactory->CreateEffect(TMS_EFFECT_GLOBAL_GAIN, iGlobalGain); |
2857 if (status == KErrNone) |
2857 if (status == KErrNone) |
2858 { |
2858 { |
2859 static_cast<TMSGlobalGainEffect*>(iGlobalGain)->AddObserver(*this, |
2859 static_cast<TMSGlobalGainEffect*> (iGlobalGain)->AddObserver( |
2860 NULL); |
2860 *this, NULL); |
2861 } |
2861 } |
2862 } |
2862 } |
2863 RDebug::Printf("[TMS STIF] CreateGlobleGainEffect Return [%d]", status); |
2863 RDebug::Printf("[TMS STIF] CreateGlobalGainEffect Return [%d]", status); |
2864 return status; |
2864 return status; |
2865 } |
2865 } |
2866 |
2866 |
2867 TInt CTmsAudioServicesTestClass::AddGainEffectToStream( |
2867 TInt CTmsAudioServicesTestClass::AddGainEffectToStream( |
2868 CStifItemParser& /*aItem*/) |
2868 CStifItemParser& /*aItem*/) |
2874 error = iTmsUplink->AddEffect(iTmsUplinkEffect); |
2874 error = iTmsUplink->AddEffect(iTmsUplinkEffect); |
2875 } |
2875 } |
2876 return error; |
2876 return error; |
2877 } |
2877 } |
2878 |
2878 |
2879 TInt CTmsAudioServicesTestClass::AddGlobleGainEffectToStream( |
2879 TInt CTmsAudioServicesTestClass::AddGlobalGainEffectToStream( |
2880 CStifItemParser& /*aItem*/) |
2880 CStifItemParser& /*aItem*/) |
2881 { |
2881 { |
2882 iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobleGainEffectToStream")); |
2882 iLog->Log(_L("CTmsAudioServicesTestClass::AddGlobalGainEffectToStream")); |
2883 TInt error = KErrNone; |
2883 TInt error = KErrNone; |
2884 if (iTmsUplink && iGlobalGain) |
2884 if (iTmsUplink && iGlobalGain) |
2885 { |
2885 { |
2886 error = iTmsUplink->AddEffect(iGlobalGain); |
2886 error = iTmsUplink->AddEffect(iGlobalGain); |
2887 } |
2887 } |
2888 return error; |
2888 return error; |
2889 } |
2889 } |
2890 |
2890 |
2891 TInt CTmsAudioServicesTestClass::RemoveGlobleGainEffectToStream( |
2891 TInt CTmsAudioServicesTestClass::RemoveGlobalGainEffectToStream( |
2892 CStifItemParser& /*aItem*/) |
2892 CStifItemParser& /*aItem*/) |
2893 { |
2893 { |
2894 iLog->Log(_L("CTmsAudioServicesTestClass::RemoveGlobleGainEffectToStream")); |
2894 iLog->Log(_L("CTmsAudioServicesTestClass::RemoveGlobalGainEffectToStream")); |
2895 TInt error = KErrNone; |
2895 TInt error = KErrNone; |
2896 if (iTmsUplink && iGlobalGain) |
2896 if (iTmsUplink && iGlobalGain) |
2897 { |
2897 { |
2898 error = iTmsUplink->RemoveEffect(iGlobalGain); |
2898 error = iTmsUplink->RemoveEffect(iGlobalGain); |
2899 } |
2899 } |