15 |
15 |
16 #include <bautils.h> |
16 #include <bautils.h> |
17 #include <utf.h> |
17 #include <utf.h> |
18 #include <mmf/common/mmfpaniccodes.h> |
18 #include <mmf/common/mmfpaniccodes.h> |
19 #include "mmfclientaudioplayer.h" |
19 #include "mmfclientaudioplayer.h" |
20 #include "mmfclientutility.h" |
20 //#include "mmfclientutility.h" |
21 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
21 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
22 #include <mmf/common/mmfdurationinfocustomcommandsimpl.h> |
22 //#include <mmf/common/mmfdurationinfocustomcommandsimpl.h> |
23 #include <mmf/common/mmfdurationinfocustomcommandsenums.h> |
23 //#include <mmf/common/mmfdurationinfocustomcommandsenums.h> |
24 #endif |
24 #endif |
25 |
25 |
26 using namespace ContentAccess; |
26 using namespace ContentAccess; |
27 |
27 |
28 // declared in the recorder module |
28 // declared in the recorder module |
1017 CMdaServer* /*aServer*/) |
1018 CMdaServer* /*aServer*/) |
1018 { |
1019 { |
1019 CMMFMdaAudioPlayerUtility* self = new(ELeave) CMMFMdaAudioPlayerUtility(aCallback, aPriority, aPref); |
1020 CMMFMdaAudioPlayerUtility* self = new(ELeave) CMMFMdaAudioPlayerUtility(aCallback, aPriority, aPref); |
1020 CleanupStack::PushL(self); |
1021 CleanupStack::PushL(self); |
1021 self->ConstructL(); |
1022 self->ConstructL(); |
1022 TMMFileSource filesource(aFileName, KDefaultContentObject, EPlay); |
1023 //TMMFileSource filesource(aFileName, KDefaultContentObject, EPlay); |
1023 self->OpenFileL(filesource); |
1024 TMMFileSource * filesource; |
|
1025 self->OpenFileL(*filesource); |
1024 CleanupStack::Pop(self); |
1026 CleanupStack::Pop(self); |
1025 return self; |
1027 return self; |
1026 } |
1028 } |
1027 |
1029 |
1028 CMMFMdaAudioPlayerUtility* CMMFMdaAudioPlayerUtility::NewDesPlayerL(const TDesC8& aData, MMdaAudioPlayerCallback& aCallback, TInt aPriority, TInt aPref, CMdaServer* /*aServer*/) |
1030 CMMFMdaAudioPlayerUtility* CMMFMdaAudioPlayerUtility::NewDesPlayerL(const TDesC8& aData, MMdaAudioPlayerCallback& aCallback, TInt aPriority, TInt aPref, CMdaServer* /*aServer*/) |
1045 return self; |
1047 return self; |
1046 } |
1048 } |
1047 |
1049 |
1048 void CMMFMdaAudioPlayerUtility::UseSharedHeap() |
1050 void CMMFMdaAudioPlayerUtility::UseSharedHeap() |
1049 { |
1051 { |
1050 iFindAndOpenController->UseSharedHeap(); |
1052 //iFindAndOpenController->UseSharedHeap(); |
1051 } |
1053 } |
1052 |
1054 |
1053 // CMMFMdaAudioPlayerUtility |
1055 // CMMFMdaAudioPlayerUtility |
1054 CMMFMdaAudioPlayerUtility::~CMMFMdaAudioPlayerUtility() |
1056 CMMFMdaAudioPlayerUtility::~CMMFMdaAudioPlayerUtility() |
1055 { |
1057 { |
1056 |
1058 |
1057 delete iControllerImplementationInformation; |
1059 //delete iControllerImplementationInformation; |
1058 delete iAsyncCallBack; |
1060 delete iAsyncCallBack; |
1059 delete iRepeatTrailingSilenceTimer; |
1061 //delete iRepeatTrailingSilenceTimer; |
1060 delete iFindAndOpenController; |
1062 //delete iFindAndOpenController; |
1061 delete iControllerEventMonitor; |
1063 //delete iControllerEventMonitor; |
1062 iMediaIds.Close(); |
1064 //iMediaIds.Close(); |
1063 iController.Close(); |
1065 //iController.Close(); |
1064 } |
1066 } |
1065 |
1067 |
1066 CMMFMdaAudioPlayerUtility::CMMFMdaAudioPlayerUtility(MMdaAudioPlayerCallback& aCallback, TInt aPriority, TInt aPref) : |
1068 CMMFMdaAudioPlayerUtility::CMMFMdaAudioPlayerUtility(MMdaAudioPlayerCallback& aCallback, TInt aPriority, TInt aPref) : |
1067 iCallback(aCallback), |
1069 CTimer(EPriorityHigh), |
1068 iAudioPlayDeviceCommands(iController), |
1070 iCallback(aCallback) |
1069 iAudioPlayControllerCommands(iController), |
1071 // iAudioPlayDeviceCommands(iController), |
1070 iNotificationRegistrationCommands(iController), |
1072 // iAudioPlayControllerCommands(iController), |
1071 iDRMCustomCommands(iController), |
1073 // iNotificationRegistrationCommands(iController) |
1072 iAudioPlayControllerSetRepeatsCommands(iController) |
1074 // iDRMCustomCommands(iController) |
|
1075 // iAudioPlayControllerSetRepeatsCommands(iController) |
1073 { |
1076 { |
1074 iState = EStopped; |
1077 iState = EStopped; |
1075 iPrioritySettings.iPriority = aPriority; |
1078 iPrioritySettings.iPriority = aPriority; |
1076 iPrioritySettings.iPref = aPref; |
1079 iPrioritySettings.iPref = aPref; |
1077 iPlayStart = TTimeIntervalMicroSeconds(0); |
1080 iPlayStart = TTimeIntervalMicroSeconds(0); |
1080 iEventHolder = KNullUid; |
1083 iEventHolder = KNullUid; |
1081 } |
1084 } |
1082 |
1085 |
1083 void CMMFMdaAudioPlayerUtility::ConstructL() |
1086 void CMMFMdaAudioPlayerUtility::ConstructL() |
1084 { |
1087 { |
1085 iControllerEventMonitor = CMMFControllerEventMonitor::NewL(*this, iController); |
1088 //iControllerEventMonitor = CMMFControllerEventMonitor::NewL(*this, iController); |
1086 iRepeatTrailingSilenceTimer = CRepeatTrailingSilenceTimer::NewL(*this); |
1089 //iRepeatTrailingSilenceTimer = CRepeatTrailingSilenceTimer::NewL(*this); |
1087 iAsyncCallBack = CMMFMdaAudioPlayerCallBack::NewL(iCallback); |
1090 iAsyncCallBack = CMMFMdaAudioPlayerCallBack::NewL(iCallback); |
1088 User::LeaveIfError(iMediaIds.Append(KUidMediaTypeAudio)); |
1091 //User::LeaveIfError(iMediaIds.Append(KUidMediaTypeAudio)); |
1089 iFindAndOpenController = CMMFFindAndOpenController::NewL(*this); |
1092 //iFindAndOpenController = CMMFFindAndOpenController::NewL(*this); |
1090 iFindAndOpenController->Configure(iMediaIds[0], iPrioritySettings); |
1093 //iFindAndOpenController->Configure(iMediaIds[0], iPrioritySettings); |
1091 iFindAndOpenController->ConfigureController(iController, *iControllerEventMonitor, CMMFFindAndOpenController::EPlayback); |
1094 //iFindAndOpenController->ConfigureController(iController, *iControllerEventMonitor, CMMFFindAndOpenController::EPlayback); |
1092 } |
1095 iAsyncCallBack->InitComplete(KErrNone, 500000); |
1093 |
1096 } |
|
1097 |
|
1098 #if 0 |
1094 void CMMFMdaAudioPlayerUtility::MfaocComplete( |
1099 void CMMFMdaAudioPlayerUtility::MfaocComplete( |
1095 TInt& aError, |
1100 TInt& aError, |
1096 RMMFController* /*aController*/, |
1101 RMMFController* /*aController*/, |
1097 TUid aControllerUid, |
1102 TUid aControllerUid, |
1098 TMMFMessageDestination* /*aSourceHandle*/, |
1103 TMMFMessageDestination* /*aSourceHandle*/, |
1128 } |
1133 } |
1129 } |
1134 } |
1130 |
1135 |
1131 iAsyncCallBack->InitComplete(aError, iDuration); |
1136 iAsyncCallBack->InitComplete(aError, iDuration); |
1132 } |
1137 } |
1133 |
1138 #endif |
1134 /** |
1139 /** |
1135 Open an audio clip from a file |
1140 Open an audio clip from a file |
1136 @param "const TFileSource& aFileSource" "the file to open" |
1141 @param "const TFileSource& aFileSource" "the file to open" |
1137 @leave "" "Leaves on an error opening the file |
1142 @leave "" "Leaves on an error opening the file |
1138 @since version 5.0 |
1143 @since version 5.0 |
1139 */ |
1144 */ |
1140 void CMMFMdaAudioPlayerUtility::OpenFileL(const TDesC& aFileName) |
1145 void CMMFMdaAudioPlayerUtility::OpenFileL(const TDesC& aFileName) |
1141 { |
1146 { |
1142 TMMFileSource filesource(aFileName, KDefaultContentObject, EPlay); |
1147 //TMMFileSource filesource(aFileName, KDefaultContentObject, EPlay); |
1143 OpenFileL(filesource); |
1148 TMMFileSource * filesource; |
|
1149 OpenFileL(*filesource); |
1144 } |
1150 } |
1145 |
1151 |
1146 /** |
1152 /** |
1147 Open an audio clip from a file |
1153 Open an audio clip from a file |
1148 @param "const RFile& aFile" "the shared session file handle to open" |
1154 @param "const RFile& aFile" "the shared session file handle to open" |
1151 @since version 5.0 |
1157 @since version 5.0 |
1152 */ |
1158 */ |
1153 void CMMFMdaAudioPlayerUtility::OpenFileL(const RFile& aFile) |
1159 void CMMFMdaAudioPlayerUtility::OpenFileL(const RFile& aFile) |
1154 { |
1160 { |
1155 RFile& file = const_cast<RFile&>(aFile); |
1161 RFile& file = const_cast<RFile&>(aFile); |
1156 TMMFileHandleSource filesource(file, KDefaultContentObject, EPlay); |
1162 //TMMFileHandleSource filesource(file, KDefaultContentObject, EPlay); |
1157 OpenFileL(filesource); |
1163 TMMFileHandleSource * filesource; |
|
1164 OpenFileL(*filesource); |
1158 } |
1165 } |
1159 |
1166 |
1160 void CMMFMdaAudioPlayerUtility::OpenFileL(const TMMSource& aSource) |
1167 void CMMFMdaAudioPlayerUtility::OpenFileL(const TMMSource& aSource) |
1161 { |
1168 { |
1162 // If iAsyncCallBack is already active, we're still in the process of notifying the client |
1169 // If iAsyncCallBack is already active, we're still in the process of notifying the client |
1163 // that a previous request to Open...(...) has completed. |
1170 // that a previous request to Open...(...) has completed. |
1164 if (iAsyncCallBack->IsActive()) |
1171 if (iAsyncCallBack->IsActive()) |
1165 User::Leave(KErrNotReady); |
1172 User::Leave(KErrNotReady); |
1166 |
1173 #if 0 |
1167 if (aSource.SourceType()==KUidMMFileHandleSource) |
1174 if (aSource.SourceType()==KUidMMFileHandleSource) |
1168 { |
1175 { |
1169 RFile& fileHandle = static_cast<const TMMFileHandleSource&>(aSource).Handle(); |
1176 RFile& fileHandle = static_cast<const TMMFileHandleSource&>(aSource).Handle(); |
1170 iFindAndOpenController->ConfigureSourceSink( |
1177 iFindAndOpenController->ConfigureSourceSink( |
1171 TMMFileHandleSource(fileHandle, aSource.UniqueId(), aSource.Intent(), aSource.IsUIEnabled()), |
1178 TMMFileHandleSource(fileHandle, aSource.UniqueId(), aSource.Intent(), aSource.IsUIEnabled()), |
1193 { |
1201 { |
1194 // If iAsyncCallBack is already active, we're still in the process of notifying the client |
1202 // If iAsyncCallBack is already active, we're still in the process of notifying the client |
1195 // that a previous request to Open...(...) has completed. |
1203 // that a previous request to Open...(...) has completed. |
1196 if (iAsyncCallBack->IsActive()) |
1204 if (iAsyncCallBack->IsActive()) |
1197 User::Leave(KErrInUse); |
1205 User::Leave(KErrInUse); |
1198 |
1206 #if 0 |
1199 iFindAndOpenController->ConfigureSourceSink( |
1207 iFindAndOpenController->ConfigureSourceSink( |
1200 CMMFFindAndOpenController::TSourceSink(KUidMmfDescriptorSource, |
1208 CMMFFindAndOpenController::TSourceSink(KUidMmfDescriptorSource, |
1201 CMMFFindAndOpenController::GetConfigDescriptor(aDescriptor)), |
1209 CMMFFindAndOpenController::GetConfigDescriptor(aDescriptor)), |
1202 CMMFFindAndOpenController::TSourceSink(KUidMmfAudioOutput)); |
1210 CMMFFindAndOpenController::TSourceSink(KUidMmfAudioOutput)); |
1203 iFindAndOpenController->OpenByDescriptor(aDescriptor); |
1211 iFindAndOpenController->OpenByDescriptor(aDescriptor); |
|
1212 #endif |
1204 } |
1213 } |
1205 |
1214 |
1206 /** |
1215 /** |
1207 Open an audio clip from a Url |
1216 Open an audio clip from a Url |
1208 @param "const TDesC& aUrl" "the url reference to the clip" |
1217 @param "const TDesC& aUrl" "the url reference to the clip" |
1213 { |
1222 { |
1214 // If iAsyncCallBack is already active, we're still in the process of notifying the client |
1223 // If iAsyncCallBack is already active, we're still in the process of notifying the client |
1215 // that a previous request to Open...(...) has completed. |
1224 // that a previous request to Open...(...) has completed. |
1216 if (iAsyncCallBack->IsActive()) |
1225 if (iAsyncCallBack->IsActive()) |
1217 User::Leave(KErrInUse); |
1226 User::Leave(KErrInUse); |
1218 |
1227 #if 0 |
1219 CBufFlat* urlCfgBuffer = NULL; |
1228 CBufFlat* urlCfgBuffer = NULL; |
1220 CMMFFindAndOpenController::GetConfigUrlL(urlCfgBuffer, aUrl, aIapId); |
1229 CMMFFindAndOpenController::GetConfigUrlL(urlCfgBuffer, aUrl, aIapId); |
1221 |
1230 |
1222 iFindAndOpenController->ConfigureSourceSink( |
1231 iFindAndOpenController->ConfigureSourceSink( |
1223 CMMFFindAndOpenController::TSourceSink(KUidMmfUrlSource, urlCfgBuffer->Ptr(0)), |
1232 CMMFFindAndOpenController::TSourceSink(KUidMmfUrlSource, urlCfgBuffer->Ptr(0)), |
1224 CMMFFindAndOpenController::TSourceSink(KUidMmfAudioOutput)); |
1233 CMMFFindAndOpenController::TSourceSink(KUidMmfAudioOutput)); |
1225 iFindAndOpenController->OpenByUrl(aUrl, aIapId, aMimeType); |
1234 iFindAndOpenController->OpenByUrl(aUrl, aIapId, aMimeType); |
1226 delete urlCfgBuffer; |
1235 delete urlCfgBuffer; |
|
1236 #endif |
1227 } |
1237 } |
1228 |
1238 |
1229 /** |
1239 /** |
1230 Begins playback of the initialised audio sample at the current volume |
1240 Begins playback of the initialised audio sample at the current volume |
1231 and priority levels. |
1241 and priority levels. |
1416 */ |
1433 */ |
1417 void CMMFMdaAudioPlayerUtility::Close() |
1434 void CMMFMdaAudioPlayerUtility::Close() |
1418 { |
1435 { |
1419 // Reset the audio player state. |
1436 // Reset the audio player state. |
1420 Stop(); |
1437 Stop(); |
|
1438 #if 0 |
1421 iControllerEventMonitor->Cancel(); |
1439 iControllerEventMonitor->Cancel(); |
1422 iController.Close(); |
1440 iController.Close(); |
1423 if (iFindAndOpenController) |
1441 if (iFindAndOpenController) |
1424 iFindAndOpenController->Close(); |
1442 iFindAndOpenController->Close(); |
1425 if(iControllerImplementationInformation) |
1443 if(iControllerImplementationInformation) |
1426 { |
1444 { |
1427 delete iControllerImplementationInformation; |
1445 delete iControllerImplementationInformation; |
1428 iControllerImplementationInformation = NULL; |
1446 iControllerImplementationInformation = NULL; |
1429 } |
1447 } |
1430 iControllerUid = KNullUid; |
1448 iControllerUid = KNullUid; |
1431 } |
1449 #endif |
1432 |
1450 } |
1433 |
1451 |
|
1452 void CMMFMdaAudioPlayerUtility::RunL() |
|
1453 { |
|
1454 switch(iState) |
|
1455 { |
|
1456 case EPlaying: |
|
1457 iAsyncCallBack->PlayComplete(KErrNone); |
|
1458 break; |
|
1459 default: |
|
1460 // do nothing |
|
1461 break; |
|
1462 } |
|
1463 } |
1434 /** |
1464 /** |
1435 Changes the current playback volume to a specified value. |
1465 Changes the current playback volume to a specified value. |
1436 |
1466 |
1437 The volume can be changed before or during playback and is effective |
1467 The volume can be changed before or during playback and is effective |
1438 immediately. |
1468 immediately. |
1490 Negative values will produce a panic USER 87. |
1522 Negative values will produce a panic USER 87. |
1491 @since 5.0 |
1523 @since 5.0 |
1492 */ |
1524 */ |
1493 void CMMFMdaAudioPlayerUtility::SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) |
1525 void CMMFMdaAudioPlayerUtility::SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) |
1494 { |
1526 { |
|
1527 #if 0 |
1495 TInt err = iAudioPlayControllerSetRepeatsCommands.SetRepeats(aRepeatNumberOfTimes, aTrailingSilence); |
1528 TInt err = iAudioPlayControllerSetRepeatsCommands.SetRepeats(aRepeatNumberOfTimes, aTrailingSilence); |
1496 |
1529 |
1497 if(err!=KErrNone) |
1530 if(err!=KErrNone) |
1498 { |
1531 { |
1499 iNumberOfTimesToRepeat = aRepeatNumberOfTimes; |
1532 iNumberOfTimesToRepeat = aRepeatNumberOfTimes; |
1500 iTrailingSilence = aTrailingSilence; |
1533 iTrailingSilence = aTrailingSilence; |
1501 } |
1534 } |
|
1535 #endif |
1502 } |
1536 } |
1503 |
1537 |
1504 /** |
1538 /** |
1505 Defines the period over which the volume level is to rise smoothly |
1539 Defines the period over which the volume level is to rise smoothly |
1506 from nothing to the normal volume level. |
1540 from nothing to the normal volume level. |
1515 |
1549 |
1516 @since 5.0 |
1550 @since 5.0 |
1517 */ |
1551 */ |
1518 void CMMFMdaAudioPlayerUtility::SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) |
1552 void CMMFMdaAudioPlayerUtility::SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) |
1519 { |
1553 { |
1520 iAudioPlayDeviceCommands.SetVolumeRamp(aRampDuration); |
1554 //iAudioPlayDeviceCommands.SetVolumeRamp(aRampDuration); |
1521 } |
1555 } |
1522 |
1556 |
1523 TInt CMMFMdaAudioPlayerUtility::SetPriority(TInt aPriority, TInt aPref) |
1557 TInt CMMFMdaAudioPlayerUtility::SetPriority(TInt aPriority, TInt aPref) |
1524 { |
1558 { |
|
1559 return KErrNone; |
|
1560 #if 0 |
1525 iPrioritySettings.iPref = aPref; |
1561 iPrioritySettings.iPref = aPref; |
1526 iPrioritySettings.iPriority = aPriority; |
1562 iPrioritySettings.iPriority = aPriority; |
1527 iFindAndOpenController->Configure(iMediaIds[0], iPrioritySettings); |
1563 iFindAndOpenController->Configure(iMediaIds[0], iPrioritySettings); |
1528 |
1564 |
1529 return iController.SetPrioritySettings(iPrioritySettings); |
1565 return iController.SetPrioritySettings(iPrioritySettings); |
|
1566 #endif |
1530 } |
1567 } |
1531 |
1568 |
1532 /** |
1569 /** |
1533 Returns the duration of the audio sample. |
1570 Returns the duration of the audio sample. |
1534 |
1571 |
1888 */ |
1954 */ |
1889 TInt CMMFMdaAudioPlayerUtility::ClearPlayWindow() |
1955 TInt CMMFMdaAudioPlayerUtility::ClearPlayWindow() |
1890 { |
1956 { |
1891 // clear play window start - very important because this is assigned |
1957 // clear play window start - very important because this is assigned |
1892 // to iPosition when we stop & is used to set the position on the next Play() |
1958 // to iPosition when we stop & is used to set the position on the next Play() |
1893 iPosition = iPlayStart = iPlayEnd = TTimeIntervalMicroSeconds(0); |
1959 //iPosition = iPlayStart = iPlayEnd = TTimeIntervalMicroSeconds(0); |
1894 |
1960 |
1895 iPlayWindowSet = EClear; |
1961 //iPlayWindowSet = EClear; |
1896 TInt err = KErrNone; |
1962 TInt err = KErrNone; |
1897 if (iState==EPlaying) |
1963 //if (iState==EPlaying) |
1898 err = iAudioPlayControllerCommands.DeletePlaybackWindow(); |
1964 //err = iAudioPlayControllerCommands.DeletePlaybackWindow(); |
1899 return err; |
1965 return err; |
1900 } |
1966 } |
1901 |
1967 |
1902 /** |
1968 /** |
1903 Sets the current playback balance |
1969 Sets the current playback balance |
1926 |
1993 |
1927 @since 7.0s |
1994 @since 7.0s |
1928 */ |
1995 */ |
1929 TInt CMMFMdaAudioPlayerUtility::GetBitRate(TUint& aBitRate) |
1996 TInt CMMFMdaAudioPlayerUtility::GetBitRate(TUint& aBitRate) |
1930 { |
1997 { |
1931 RMMFAudioControllerCustomCommands controller(iController); |
1998 //RMMFAudioControllerCustomCommands controller(iController); |
1932 TInt err = controller.GetSourceBitRate(aBitRate); |
1999 //TInt err = controller.GetSourceBitRate(aBitRate); |
1933 return err; |
2000 //return err; |
|
2001 return KErrNone; |
1934 } |
2002 } |
1935 |
2003 |
1936 const CMMFControllerImplementationInformation& CMMFMdaAudioPlayerUtility::ControllerImplementationInformationL() |
2004 const CMMFControllerImplementationInformation& CMMFMdaAudioPlayerUtility::ControllerImplementationInformationL() |
1937 { |
2005 { |
|
2006 #if 0 |
1938 if (!iControllerImplementationInformation) |
2007 if (!iControllerImplementationInformation) |
1939 { |
2008 { |
1940 if (iControllerUid==KNullUid) |
2009 if (iControllerUid==KNullUid) |
1941 User::Leave(KErrNotReady); |
2010 User::Leave(KErrNotReady); |
1942 iControllerImplementationInformation = CMMFControllerImplementationInformation::NewL(iControllerUid); |
2011 iControllerImplementationInformation = CMMFControllerImplementationInformation::NewL(iControllerUid); |
1943 } |
2012 } |
1944 return *iControllerImplementationInformation; |
2013 return *iControllerImplementationInformation; |
|
2014 #endif |
|
2015 User::Leave(KErrNotSupported); |
|
2016 return *iControllerImplementationInformation; |
1945 } |
2017 } |
1946 |
2018 |
1947 void CMMFMdaAudioPlayerUtility::GetAudioLoadingProgressL(TInt& aPercentageProgress) |
2019 void CMMFMdaAudioPlayerUtility::GetAudioLoadingProgressL(TInt& aPercentageProgress) |
1948 { |
2020 { |
1949 User::LeaveIfError(iAudioPlayControllerCommands.GetLoadingProgress(aPercentageProgress)); |
2021 //User::LeaveIfError(iAudioPlayControllerCommands.GetLoadingProgress(aPercentageProgress)); |
|
2022 User::Leave(KErrNotSupported); |
1950 } |
2023 } |
1951 |
2024 |
1952 TInt CMMFMdaAudioPlayerUtility::CustomCommandSync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TDes8& aDataFrom) |
2025 TInt CMMFMdaAudioPlayerUtility::CustomCommandSync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TDes8& aDataFrom) |
1953 { |
2026 { |
1954 return iController.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom); |
2027 //return iController.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom); |
|
2028 return KErrNotSupported; |
1955 } |
2029 } |
1956 |
2030 |
1957 TInt CMMFMdaAudioPlayerUtility::CustomCommandSync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2) |
2031 TInt CMMFMdaAudioPlayerUtility::CustomCommandSync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2) |
1958 { |
2032 { |
1959 return iController.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2); |
2033 //return iController.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2); |
|
2034 return KErrNotSupported; |
1960 } |
2035 } |
1961 |
2036 |
1962 void CMMFMdaAudioPlayerUtility::CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TDes8& aDataFrom, TRequestStatus& aStatus) |
2037 void CMMFMdaAudioPlayerUtility::CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TDes8& aDataFrom, TRequestStatus& aStatus) |
1963 { |
2038 { |
1964 iController.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom, aStatus); |
2039 //iController.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom, aStatus); |
1965 } |
2040 } |
1966 |
2041 |
1967 void CMMFMdaAudioPlayerUtility::CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TRequestStatus& aStatus) |
2042 void CMMFMdaAudioPlayerUtility::CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination, TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2, TRequestStatus& aStatus) |
1968 { |
2043 { |
1969 iController.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aStatus); |
2044 //iController.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aStatus); |
1970 } |
2045 } |
1971 |
2046 |
1972 /** |
2047 /** |
1973 Returns the current playback balance |
2048 Returns the current playback balance |
1974 |
2049 |
1979 |
2054 |
1980 @since 7.0s |
2055 @since 7.0s |
1981 */ |
2056 */ |
1982 TInt CMMFMdaAudioPlayerUtility::GetBalance(TInt& aBalance) |
2057 TInt CMMFMdaAudioPlayerUtility::GetBalance(TInt& aBalance) |
1983 { |
2058 { |
1984 TInt err = iAudioPlayDeviceCommands.GetBalance(aBalance); |
2059 //TInt err = iAudioPlayDeviceCommands.GetBalance(aBalance); |
1985 return err; |
2060 //return err; |
|
2061 aBalance = KMMFBalanceMaxLeft; |
|
2062 return KErrNone; |
1986 } |
2063 } |
1987 |
2064 |
1988 MMMFDRMCustomCommand* CMMFMdaAudioPlayerUtility::GetDRMCustomCommand() |
2065 MMMFDRMCustomCommand* CMMFMdaAudioPlayerUtility::GetDRMCustomCommand() |
1989 { |
2066 { |
|
2067 #if 0 |
1990 // TODO: check controller supports MMMFDRMCustomCommandImplementor |
2068 // TODO: check controller supports MMMFDRMCustomCommandImplementor |
1991 if (iDRMCustomCommands.IsSupported()) |
2069 if (iDRMCustomCommands.IsSupported()) |
1992 { |
2070 { |
1993 return static_cast<MMMFDRMCustomCommand*>(&iDRMCustomCommands); |
2071 return static_cast<MMMFDRMCustomCommand*>(&iDRMCustomCommands); |
1994 } |
2072 } |
1995 else |
2073 else |
1996 { |
2074 { |
1997 return NULL; |
2075 return NULL; |
1998 } |
2076 } |
|
2077 #endif |
|
2078 return NULL; |
1999 } |
2079 } |
2000 |
2080 |
2001 void CMMFMdaAudioPlayerUtility::RegisterForAudioLoadingNotification(MAudioLoadingObserver& aLoadingObserver) |
2081 void CMMFMdaAudioPlayerUtility::RegisterForAudioLoadingNotification(MAudioLoadingObserver& aLoadingObserver) |
2002 { |
2082 { |
2003 iLoadingObserver = &aLoadingObserver; |
2083 iLoadingObserver = &aLoadingObserver; |
2005 |
2085 |
2006 TInt CMMFMdaAudioPlayerUtility::RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback& aCallback, |
2086 TInt CMMFMdaAudioPlayerUtility::RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback& aCallback, |
2007 TUid aNotificationEventUid, |
2087 TUid aNotificationEventUid, |
2008 const TDesC8& aNotificationRegistrationData) |
2088 const TDesC8& aNotificationRegistrationData) |
2009 { |
2089 { |
|
2090 #if 0 |
2010 iAudioResourceNotificationCallBack = &aCallback; |
2091 iAudioResourceNotificationCallBack = &aCallback; |
2011 TInt err = iNotificationRegistrationCommands.RegisterAsClient(aNotificationEventUid, aNotificationRegistrationData); |
2092 TInt err = iNotificationRegistrationCommands.RegisterAsClient(aNotificationEventUid, aNotificationRegistrationData); |
2012 if(err == KErrNotReady) |
2093 if(err == KErrNotReady) |
2013 { |
2094 { |
2014 iEventHolder = aNotificationEventUid; |
2095 iEventHolder = aNotificationEventUid; |
2036 iEventHolder = KNullUid; |
2120 iEventHolder = KNullUid; |
2037 iNotificationDataHolder = KNullDesC8; |
2121 iNotificationDataHolder = KNullDesC8; |
2038 return KErrNone; |
2122 return KErrNone; |
2039 } |
2123 } |
2040 return err; |
2124 return err; |
|
2125 #endif |
|
2126 return KErrNotSupported; |
2041 } |
2127 } |
2042 |
2128 |
2043 TInt CMMFMdaAudioPlayerUtility::WillResumePlay() |
2129 TInt CMMFMdaAudioPlayerUtility::WillResumePlay() |
2044 { |
2130 { |
2045 return iNotificationRegistrationCommands.WillResumePlay(); |
2131 //return iNotificationRegistrationCommands.WillResumePlay(); |
|
2132 return KErrNone; |
2046 } |
2133 } |
2047 |
2134 |
2048 TInt CMMFMdaAudioPlayerUtility::SetThreadPriority(const TThreadPriority& aThreadPriority) const |
2135 TInt CMMFMdaAudioPlayerUtility::SetThreadPriority(const TThreadPriority& aThreadPriority) const |
2049 { |
2136 { |
2050 return iController.SetThreadPriority(aThreadPriority); |
2137 //return iController.SetThreadPriority(aThreadPriority); |
|
2138 return KErrNone; |
2051 } |
2139 } |
2052 |
2140 |
2053 CRepeatTrailingSilenceTimer* CRepeatTrailingSilenceTimer::NewL(MRepeatTrailingSilenceTimerObs& aObs) |
2141 CRepeatTrailingSilenceTimer* CRepeatTrailingSilenceTimer::NewL(MRepeatTrailingSilenceTimerObs& aObs) |
2054 { |
2142 { |
2055 CRepeatTrailingSilenceTimer* s = new(ELeave) CRepeatTrailingSilenceTimer(aObs); |
2143 CRepeatTrailingSilenceTimer* s = new(ELeave) CRepeatTrailingSilenceTimer(aObs); |