equal
deleted
inserted
replaced
97 ChangeState(ERealized); |
97 ChangeState(ERealized); |
98 } |
98 } |
99 DEBUG("MMA: CMMAMidiPlayer: DeallocateL -"); |
99 DEBUG("MMA: CMMAMidiPlayer: DeallocateL -"); |
100 } |
100 } |
101 |
101 |
102 void CMMADRMAudioPlayer::StartL() |
102 void CMMADRMAudioPlayer::StartL(TBool aPostEvent) |
103 { |
103 { |
104 // start can't be called to not ready player |
104 // start can't be called to not ready player |
105 ASSERT(iState == EPrefetched); |
105 ASSERT(iState == EPrefetched); |
106 |
106 |
107 TInt64 time = TInt64(KMediaStartTime); |
107 TInt64 time = TInt64(KMediaStartTime); |
123 iUtility->SetPosition(time); |
123 iUtility->SetPosition(time); |
124 } |
124 } |
125 |
125 |
126 iUtility->Play(); |
126 iUtility->Play(); |
127 |
127 |
128 // inform java side |
|
129 PostActionCompleted(KErrNone); // java start return |
128 PostActionCompleted(KErrNone); // java start return |
130 PostLongEvent(CMMAPlayerEvent::EStarted, time); |
129 if (aPostEvent) |
|
130 { |
|
131 // inform java side |
|
132 PostLongEvent(CMMAPlayerEvent::EStarted, time); |
|
133 } |
131 ChangeState(EStarted); |
134 ChangeState(EStarted); |
132 } |
135 } |
133 |
136 |
134 void CMMADRMAudioPlayer::StopL(TBool aPostEvent) |
137 void CMMADRMAudioPlayer::StopL(TBool aPostEvent) |
135 { |
138 { |
273 { |
276 { |
274 iRepeatCount++; |
277 iRepeatCount++; |
275 |
278 |
276 if (iRepeatForever || iRepeatCount < iRepeatNumberOfTimes) |
279 if (iRepeatForever || iRepeatCount < iRepeatNumberOfTimes) |
277 { |
280 { |
278 StartL(); |
281 StartL(ETrue); |
279 } |
282 } |
280 else |
283 else |
281 { |
284 { |
282 iRepeatCount = 0; |
285 iRepeatCount = 0; |
283 TTimeIntervalMicroSeconds position(time); |
286 TTimeIntervalMicroSeconds position(time); |