|
1 /* |
|
2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This class is used for MIDI. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <mmf/server/mmffile.h> |
|
21 #include <jdebug.h> |
|
22 #include <e32base.h> |
|
23 #include <AudioPreference.h> |
|
24 |
|
25 #include "cmmamidiplayer.h" |
|
26 #include "mmmadisplay.h" |
|
27 |
|
28 const TInt KErrorMessageSize = 32; |
|
29 _LIT(KErrDefaultError, "Symbian OS Error: %d"); |
|
30 const TInt KMidiDefaultBank = 0x3c80; |
|
31 const TInt KMidiDrumBank = 0x3c7c; |
|
32 const TInt KMidiDrumChannel = 9; |
|
33 const TInt KMidiChannels = 16; |
|
34 const TInt KMidiDefaultInstrument = 1; |
|
35 |
|
36 CMMAMIDIPlayer* CMMAMIDIPlayer::NewLC(const TDesC& aContentType, |
|
37 TFileName aFileName) |
|
38 { |
|
39 CMMAMIDIPlayer* self = new(ELeave) CMMAMIDIPlayer(aFileName); |
|
40 CleanupStack::PushL(self); |
|
41 self->ConstructL(aContentType); |
|
42 return self; |
|
43 } |
|
44 |
|
45 CMMAMIDIPlayer::~CMMAMIDIPlayer() |
|
46 { |
|
47 CloseClientUtility(); |
|
48 // new function added to CMMAPlayer delete the controls before the destruction of iMidi. |
|
49 DeleteControls(); |
|
50 delete iMidi; |
|
51 delete iActiveSchedulerWait; |
|
52 iObservers.Close(); |
|
53 |
|
54 DEBUG("MMA::CMMAMIDIPlayer::~CMMAMIDIPlayer"); |
|
55 } |
|
56 |
|
57 void CMMAMIDIPlayer::ConstructL(const TDesC& aContentType) |
|
58 { |
|
59 DEBUG("CMMAMIDIPlayer::ConstructL"); |
|
60 iContentType = aContentType.AllocL(); |
|
61 iActiveSchedulerWait = new(ELeave)CActiveSchedulerWait; |
|
62 iMidi = CMidiClientUtility::NewL(*this, KAudioPriorityRecording, |
|
63 KMMAMIDIPriorityPreference, ETrue); |
|
64 |
|
65 CMMAPlayer::ConstructL(); |
|
66 } |
|
67 |
|
68 CMMAMIDIPlayer::CMMAMIDIPlayer(TFileName aFileName): |
|
69 iFileName(aFileName), |
|
70 iMediaTime(KTimeUnknown), iStartedEventTime(0) |
|
71 { |
|
72 } |
|
73 |
|
74 EXPORT_C CMidiClientUtility* CMMAMIDIPlayer::MidiClient() const |
|
75 { |
|
76 return iMidi; |
|
77 } |
|
78 |
|
79 |
|
80 void CMMAMIDIPlayer::RealizeL() |
|
81 { |
|
82 DEBUG("CMMAMIDIPlayer::RealizeL"); |
|
83 CMMAPlayer::RealizeL(); |
|
84 } |
|
85 |
|
86 void CMMAMIDIPlayer::PrefetchL() |
|
87 { |
|
88 DEBUG_INT("CMMAMIDIPlayer::PrefetchL stream count %d", iSourceStreams.Count()); |
|
89 if (iFileName != KNullDesC) |
|
90 { |
|
91 iMidi->OpenFile(iFileName); |
|
92 } |
|
93 else if (iSourceStreams.Count() == 0) |
|
94 { |
|
95 // We have no data, but need to initialize the player |
|
96 // Preparing all channels |
|
97 for (TInt i = 0; i < KMidiChannels; i++) |
|
98 { |
|
99 iMidi->SetInstrumentL(i, KMidiDefaultBank, |
|
100 KMidiDefaultInstrument); |
|
101 } |
|
102 |
|
103 // Setting drums to channel 10 |
|
104 iMidi->SetInstrumentL(KMidiDrumChannel, KMidiDrumBank, |
|
105 KMidiDefaultInstrument); |
|
106 |
|
107 // Start it immediately in order to get MIDIControl work without |
|
108 // calling the start. This is how reference implementation works. |
|
109 iMidi->Play(); |
|
110 } |
|
111 else |
|
112 { |
|
113 // Created with content, audio player will initialize controller |
|
114 // and data source. |
|
115 iSourceStreams[ 0 ]->ReadAllL(); |
|
116 } |
|
117 } |
|
118 |
|
119 // |
|
120 // This method is called when CMMASourceStreamReader finished reading |
|
121 // initiated in PrefetchL |
|
122 // |
|
123 void CMMAMIDIPlayer::ReadCompletedL(TInt aStatus, const TDesC8& aData) |
|
124 { |
|
125 if (aStatus < KErrNone) |
|
126 { |
|
127 PostActionCompleted(aStatus); |
|
128 } |
|
129 else |
|
130 { |
|
131 // we're not finished yet |
|
132 iMidi->OpenDes(aData); //wait for MMidiClientUtilityObserver::MmcuoStateChanged |
|
133 } |
|
134 } |
|
135 |
|
136 void CMMAMIDIPlayer::DeallocateL() |
|
137 { |
|
138 DEBUG("MMA: CMMAMidiPlayer: DeallocateL +"); |
|
139 if (iState == EPrefetched) |
|
140 { |
|
141 CloseClientUtility(); |
|
142 ResetSourceStreams(); |
|
143 ChangeState(ERealized); |
|
144 } |
|
145 DEBUG("MMA: CMMAMidiPlayer: DeallocateL -"); |
|
146 } |
|
147 |
|
148 void CMMAMIDIPlayer::StartL(TBool aPostEvent) |
|
149 { |
|
150 iMediaTime = KTimeUnknown; |
|
151 |
|
152 // Player is already started if this player is constructed with |
|
153 // device://midi locator. |
|
154 TBool isDeviceMidi = (iSourceStreams.Count() == 0 && |
|
155 iFileName == KNullDesC); |
|
156 if (!isDeviceMidi) |
|
157 { |
|
158 iMidi->Play(); |
|
159 } |
|
160 |
|
161 if (aPostEvent) |
|
162 { |
|
163 // inform java side |
|
164 PostLongEvent(CMMAPlayerEvent::EStarted, iStartedEventTime); |
|
165 } |
|
166 ChangeState(EStarted); |
|
167 |
|
168 // To achieve similar functionality as reference implementation, |
|
169 // END_OF_MEDIA must be sent right after Start on device://midi. |
|
170 if (isDeviceMidi) |
|
171 { |
|
172 PostLongEvent(CMMAPlayerEvent::EEndOfMedia, iStartedEventTime); |
|
173 ChangeState(EPrefetched); |
|
174 } |
|
175 PostActionCompleted(KErrNone); // java start return |
|
176 } |
|
177 |
|
178 void CMMAMIDIPlayer::StopL(TBool aPostEvent) |
|
179 { |
|
180 DEBUG("MMA: CMMAMidiPlayer::StopL"); |
|
181 if (iState == EStarted) |
|
182 { |
|
183 TInt64 time; |
|
184 GetMediaTime(&time); |
|
185 iStartedEventTime = time; |
|
186 |
|
187 // do the stop only if we are playing some content |
|
188 if ((iSourceStreams.Count() > 0) || |
|
189 (iFileName != KNullDesC)) |
|
190 { |
|
191 // should actually pause!!! |
|
192 iMidi->Stop(TTimeIntervalMicroSeconds(0)); |
|
193 } |
|
194 |
|
195 if (aPostEvent) |
|
196 { |
|
197 PostLongEvent(CMMAPlayerEvent::EStopped, time); |
|
198 } |
|
199 // go back to prefetched state |
|
200 ChangeState(EPrefetched); |
|
201 } |
|
202 } |
|
203 |
|
204 void CMMAMIDIPlayer::GetDuration(TInt64* aDuration) |
|
205 { |
|
206 // Special case for device://midi |
|
207 if ((iSourceStreams.Count() == 0) && |
|
208 (iFileName == KNullDesC)) |
|
209 { |
|
210 iDuration = KErrNone; |
|
211 } |
|
212 else if (iDuration == KTimeUnknown) |
|
213 { |
|
214 TRAPD(err, iDuration = iMidi->DurationMicroSecondsL().Int64()); |
|
215 if (err != KErrNone) |
|
216 { |
|
217 // Duration was not available. |
|
218 iDuration = KTimeUnknown; |
|
219 } |
|
220 } |
|
221 |
|
222 *aDuration = iDuration; |
|
223 } |
|
224 |
|
225 void CMMAMIDIPlayer::SetMediaTimeL(TInt64* aTime) |
|
226 { |
|
227 TTimeIntervalMicroSeconds position(*aTime); |
|
228 iMidi->SetPositionMicroSecondsL(position); |
|
229 |
|
230 // Reset cached media time, because actual set position may be |
|
231 // something else than aTime. |
|
232 iMediaTime = KTimeUnknown; |
|
233 |
|
234 // Inform about the position change to the StateListeners |
|
235 ChangeState(iState); |
|
236 |
|
237 // Get the actual media time |
|
238 GetMediaTime(aTime); |
|
239 |
|
240 iStartedEventTime = iMediaTime; |
|
241 } |
|
242 |
|
243 void CMMAMIDIPlayer::GetMediaTime(TInt64* aMediaTime) |
|
244 { |
|
245 // Special case for device://midi |
|
246 if ((iSourceStreams.Count() == 0) && |
|
247 (iFileName == KNullDesC)) |
|
248 { |
|
249 iMediaTime = KErrNone; |
|
250 } |
|
251 else if (iMediaTime == KTimeUnknown || iState == EStarted) |
|
252 { |
|
253 TTimeIntervalMicroSeconds position(0); |
|
254 TRAPD(error, position = iMidi->PositionMicroSecondsL()); |
|
255 |
|
256 if (error == KErrNone) |
|
257 { |
|
258 TInt64 newTime = position.Int64(); |
|
259 |
|
260 // Sanity check for media time going backwards or beyond the |
|
261 // duration. |
|
262 // Some native controls may return zero media time for |
|
263 // a few moments just before playback will complete. |
|
264 if (newTime < iMediaTime || |
|
265 (iDuration > 0 && newTime > iDuration)) |
|
266 { |
|
267 GetDuration(&iMediaTime); |
|
268 } |
|
269 else |
|
270 { |
|
271 // set return value |
|
272 iMediaTime = newTime; |
|
273 } |
|
274 } |
|
275 else |
|
276 { |
|
277 // media time cannot be get |
|
278 iMediaTime = KTimeUnknown; |
|
279 } |
|
280 } |
|
281 *aMediaTime = iMediaTime; |
|
282 } |
|
283 |
|
284 void CMMAMIDIPlayer::ReInitializeMidiEngineL(const TDesC8* aMidiSequence) |
|
285 { |
|
286 DEBUG("MMA: CMMAMIDIPlayer: ReInitializeMidiEngineL: + "); |
|
287 |
|
288 CloseClientUtility(); |
|
289 |
|
290 DEBUG("MMA: CMMAMidiPlayer: ReInitializeMidiEngineL: Opening descriptor"); |
|
291 |
|
292 iMidi->OpenDes(*aMidiSequence); |
|
293 // Wait until asynchronous OpenDes call has completed |
|
294 if (!iActiveSchedulerWait->IsStarted()) |
|
295 { |
|
296 iActiveSchedulerWait->Start(); |
|
297 } |
|
298 ChangeState(EPrefetched); |
|
299 DEBUG("MMA: CMMAMIDIPlayer: ReInitializeMidiEngineL: - "); |
|
300 } |
|
301 |
|
302 void CMMAMIDIPlayer::addObserverL(MMidiClientUtilityObserver* aObserver) |
|
303 { |
|
304 iObservers.AppendL(aObserver); |
|
305 } |
|
306 |
|
307 void CMMAMIDIPlayer::CloseL() |
|
308 { |
|
309 CMMAPlayer::CloseL(); |
|
310 CloseClientUtility(); |
|
311 } |
|
312 |
|
313 const TDesC& CMMAMIDIPlayer::Type() |
|
314 { |
|
315 return KMMAMIDIPlayer; |
|
316 } |
|
317 |
|
318 void CMMAMIDIPlayer::PlayCompleteL(TInt aError) |
|
319 { |
|
320 DEBUG("MMA: CMMAMidiPlayer: PlayCompleteL +"); |
|
321 DEBUG_INT("MMA: CMMAMidiPlayer: PlayCompleteL: Error=%d", aError); |
|
322 TInt64 duration; |
|
323 GetDuration(&duration); |
|
324 iMediaTime = duration; |
|
325 iStartedEventTime = 0; |
|
326 |
|
327 iMidi->Stop(TTimeIntervalMicroSeconds(0)); |
|
328 |
|
329 // go back to prefetched state |
|
330 ChangeState(EPrefetched); // ready to play again |
|
331 |
|
332 // Send 'Stopped' only when stop() is called. |
|
333 PostLongEvent(CMMAPlayerEvent::EEndOfMedia, duration); |
|
334 |
|
335 if (aError == KErrNone) |
|
336 { |
|
337 iRepeatCount++; |
|
338 |
|
339 if (iRepeatForever || iRepeatCount < iRepeatNumberOfTimes) |
|
340 { |
|
341 StartL(ETrue); |
|
342 } |
|
343 else |
|
344 { |
|
345 iRepeatCount = 0; |
|
346 } |
|
347 } |
|
348 else |
|
349 { |
|
350 // error has occured, setting correct number of |
|
351 // repeats for next start |
|
352 SetLoopCount(iRepeatNumberOfTimes); |
|
353 } |
|
354 DEBUG("MMA: CMMAMidiPlayer: PlayCompleteL -"); |
|
355 } |
|
356 |
|
357 void CMMAMIDIPlayer::MmcuoStateChanged(TMidiState aOldState, |
|
358 TMidiState aNewState, |
|
359 const TTimeIntervalMicroSeconds& aTime, |
|
360 TInt aError) |
|
361 { |
|
362 TInt err = aError; |
|
363 |
|
364 DEBUG_INT3("MMA: CMMAMIDIPlayer: MmcuoStateChanged: Old=%d, New=%d, Error=%d", |
|
365 aOldState, |
|
366 aNewState, |
|
367 err); |
|
368 // Closing the utility or reinitialising |
|
369 #ifdef RD_JAVA_TMIDISTATECHANGE |
|
370 if (iActiveSchedulerWait->IsStarted() && |
|
371 ((aNewState == EMidiStateClosedDisengaged) || |
|
372 (aNewState == EMidiStateOpenDisengaged) || |
|
373 (aNewState == EMidiStateClosedEngaged))) |
|
374 #else |
|
375 if (iActiveSchedulerWait->IsStarted() && |
|
376 ((aNewState == EClosedDisengaged) || |
|
377 (aNewState == EOpenDisengaged) || |
|
378 (aNewState == EClosedEngaged))) |
|
379 #endif |
|
380 { |
|
381 iActiveSchedulerWait->AsyncStop(); |
|
382 } |
|
383 // changing from realized to prefetched state |
|
384 #ifdef RD_JAVA_TMIDISTATECHANGE |
|
385 else if ((iState == ERealized) && |
|
386 (aOldState == EMidiStateClosedDisengaged) && |
|
387 ((aNewState == EMidiStateOpenDisengaged) || |
|
388 (aNewState == EMidiStateClosedEngaged) || |
|
389 (aNewState == EMidiStateClosedDisengaged))) |
|
390 #else |
|
391 else if ((iState == ERealized) && |
|
392 (aOldState == EClosed) && |
|
393 ((aNewState == EOpen) || (aNewState == EClosedEngaged) || |
|
394 (aNewState == EClosed))) // EClosed is EClosedDisengaged |
|
395 #endif |
|
396 { |
|
397 if (aError == KErrNone) |
|
398 { |
|
399 // prefetch succeed |
|
400 ChangeState(EPrefetched); |
|
401 } |
|
402 // else state remains realized |
|
403 |
|
404 // inform java |
|
405 PostActionCompleted(aError); |
|
406 err = KErrNone; // don't report the error again |
|
407 } |
|
408 #ifdef RD_JAVA_TMIDISTATECHANGE |
|
409 else if ((aOldState == EMidiStateOpenPlaying) && |
|
410 (aNewState == EMidiStateOpenEngaged) && |
|
411 (iState == EStarted)) |
|
412 #else |
|
413 else if ((aOldState == EPlaying) && |
|
414 (aNewState == EOpenEngaged) && |
|
415 (iState == EStarted)) |
|
416 #endif |
|
417 { |
|
418 // If iState is not EStarted PlayCompleteL may not be called because |
|
419 // player may be already stopped. |
|
420 |
|
421 // playing completed |
|
422 TRAPD(playErr, PlayCompleteL(aError)); |
|
423 if (playErr != KErrNone) |
|
424 { |
|
425 err = playErr; |
|
426 } |
|
427 } |
|
428 |
|
429 if (err != KErrNone) |
|
430 { |
|
431 TBuf<KErrorMessageSize> errorMessage; |
|
432 errorMessage.Format(KErrDefaultError, err); |
|
433 PostStringEvent(CMMAPlayerEvent::EError, errorMessage); |
|
434 if (iActiveSchedulerWait->IsStarted()) |
|
435 { |
|
436 iActiveSchedulerWait->AsyncStop(); |
|
437 } |
|
438 } |
|
439 |
|
440 // notify observers |
|
441 TInt count = iObservers.Count(); |
|
442 for (TInt i = 0; i < count; i++) |
|
443 { |
|
444 iObservers[ i ]->MmcuoStateChanged(aOldState, aNewState, aTime, aError); |
|
445 } |
|
446 |
|
447 DEBUG_INT("MMA: CMMAMIDIPlayer: MmcuoStateChanged: midi state %d", |
|
448 iMidi->State()); |
|
449 } |
|
450 |
|
451 void CMMAMIDIPlayer::MmcuoTempoChanged(TInt aMicroBeatsPerMinute) |
|
452 { |
|
453 // notify observers |
|
454 TInt count = iObservers.Count(); |
|
455 for (TInt i = 0; i < count; i++) |
|
456 { |
|
457 iObservers[ i ]->MmcuoTempoChanged(aMicroBeatsPerMinute); |
|
458 } |
|
459 } |
|
460 |
|
461 void CMMAMIDIPlayer::MmcuoVolumeChanged(TInt aChannel,TReal32 aVolumeInDecibels) |
|
462 { |
|
463 // notify observers |
|
464 TInt count = iObservers.Count(); |
|
465 for (TInt i = 0; i < count; i++) |
|
466 { |
|
467 iObservers[ i ]->MmcuoVolumeChanged(aChannel, aVolumeInDecibels); |
|
468 } |
|
469 } |
|
470 |
|
471 void CMMAMIDIPlayer::MmcuoMuteChanged(TInt aChannel,TBool aMuted) |
|
472 { |
|
473 // notify observers |
|
474 TInt count = iObservers.Count(); |
|
475 for (TInt i = 0; i < count; i++) |
|
476 { |
|
477 iObservers[ i ]->MmcuoMuteChanged(aChannel, aMuted); |
|
478 } |
|
479 } |
|
480 |
|
481 void CMMAMIDIPlayer::MmcuoSyncUpdate(const TTimeIntervalMicroSeconds& aMicroSeconds,TInt64 aMicroBeats) |
|
482 { |
|
483 // notify observers |
|
484 TInt count = iObservers.Count(); |
|
485 for (TInt i = 0; i < count; i++) |
|
486 { |
|
487 iObservers[ i ]->MmcuoSyncUpdate(aMicroSeconds, aMicroBeats); |
|
488 } |
|
489 } |
|
490 |
|
491 void CMMAMIDIPlayer::MmcuoMetaDataEntryFound(const TInt aMetaDataEntryId,const TTimeIntervalMicroSeconds& aPosition) |
|
492 { |
|
493 // notify observers |
|
494 TInt count = iObservers.Count(); |
|
495 for (TInt i = 0; i < count; i++) |
|
496 { |
|
497 iObservers[ i ]->MmcuoMetaDataEntryFound(aMetaDataEntryId, aPosition); |
|
498 } |
|
499 } |
|
500 |
|
501 void CMMAMIDIPlayer::MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& aMessage) |
|
502 { |
|
503 // notify observers |
|
504 TInt count = iObservers.Count(); |
|
505 for (TInt i = 0; i < count; i++) |
|
506 { |
|
507 iObservers[ i ]->MmcuoMipMessageReceived(aMessage); |
|
508 } |
|
509 } |
|
510 |
|
511 void CMMAMIDIPlayer::MmcuoPolyphonyChanged(TInt aNewPolyphony) |
|
512 { |
|
513 // notify observers |
|
514 TInt count = iObservers.Count(); |
|
515 for (TInt i = 0; i < count; i++) |
|
516 { |
|
517 iObservers[ i ]->MmcuoPolyphonyChanged(aNewPolyphony); |
|
518 } |
|
519 } |
|
520 |
|
521 void CMMAMIDIPlayer::MmcuoInstrumentChanged(TInt aChannel,TInt aBankId,TInt aInstrumentId) |
|
522 { |
|
523 // notify observers |
|
524 TInt count = iObservers.Count(); |
|
525 for (TInt i = 0; i < count; i++) |
|
526 { |
|
527 iObservers[ i ]->MmcuoInstrumentChanged(aChannel, aBankId, aInstrumentId); |
|
528 } |
|
529 } |
|
530 |
|
531 void CMMAMIDIPlayer::CloseClientUtility() |
|
532 { |
|
533 DEBUG("MMA: CMMAMidiPlayer: CloseClientUtility +"); |
|
534 if (iMidi && |
|
535 iActiveSchedulerWait && |
|
536 #ifdef RD_JAVA_TMIDISTATECHANGE |
|
537 (iMidi->State() != EMidiStateClosedDisengaged)) |
|
538 #else |
|
539 (iMidi->State() != EClosed)) |
|
540 #endif |
|
541 { |
|
542 // Have to stop midi before closing, |
|
543 // this case is for device://midi |
|
544 #ifdef RD_JAVA_TMIDISTATECHANGE |
|
545 if (iMidi->State() == EMidiStateClosedEngaged) |
|
546 #else |
|
547 if (iMidi->State() == EClosedEngaged) |
|
548 #endif |
|
549 { |
|
550 iMidi->Stop(TTimeIntervalMicroSeconds(0)); |
|
551 if (!iActiveSchedulerWait->IsStarted()) |
|
552 { |
|
553 iActiveSchedulerWait->Start(); |
|
554 } |
|
555 } |
|
556 else |
|
557 { |
|
558 // Calling Close and Stop or Stop and Close should |
|
559 // always lead to EClosed state. |
|
560 |
|
561 // From EOpenEngaged or EOpenPlaying to EClosedEngaged |
|
562 // or from EOpenDisengaged to EClosedDisengaged |
|
563 iMidi->Close(); |
|
564 if (!iActiveSchedulerWait->IsStarted()) |
|
565 { |
|
566 iActiveSchedulerWait->Start(); |
|
567 } |
|
568 |
|
569 DEBUG_INT("State after Close: %d", iMidi->State()); |
|
570 |
|
571 // If not in EClosedDisengaged yet |
|
572 #ifdef RD_JAVA_TMIDISTATECHANGE |
|
573 if (iMidi->State() != EMidiStateClosedDisengaged) |
|
574 #else |
|
575 if (iMidi->State() != EClosed) |
|
576 #endif |
|
577 { |
|
578 // From EClosedEngaged to EClosedDisengaged |
|
579 iMidi->Stop(TTimeIntervalMicroSeconds(0)); |
|
580 if (!iActiveSchedulerWait->IsStarted()) |
|
581 { |
|
582 iActiveSchedulerWait->Start(); |
|
583 } |
|
584 DEBUG_INT("State after Stop: %d", iMidi->State()); |
|
585 } |
|
586 } |
|
587 DEBUG_INT("MMA: CMMAMidiPlayer: CloseClientUtility: State after close: %d", iMidi->State()); |
|
588 } |
|
589 DEBUG("MMA: CMMAMidiPlayer: CloseClientUtility -"); |
|
590 } |
|
591 |
|
592 // END OF FILE |