1 /*-------------- Telecommunications & Signal Processing Lab ---------------
2                              McGill University
3 
4 Routine:
5   void AOsetFIopt (const struct AO_FIpar *FI, int NsampND, int RAccess)
6 
7 Purpose:
8   Set input file options
9 
10 Description:
11   This routine sets the input file options in the audio file options structure
12   from the input file parameter structure.
13 
14   Calling this routine as
15     AOsetFIopt (FI, 0, 0)
16   will leave NsampND and RAccess at their default settings.
17 
18 Parameters:
19    -> const struct AO_FIpar *FI
20       Input file parameters
21    -> int NsampND
22       Flag to determine if number of samples must be known
23       0 - Nsamp must be known
24       1 - Nsamp=AF_NSAMP_UNDEF allowed
25    -> int RAccess
26       Flag to determine if the file must be random access
27       0 - File need not be random access, but an error will occur when an
28           attempt is made to reposition the file
29       1 - File must be random access
30 
31 Author / revision:
32   P. Kabal  Copyright (C) 2003
33   $Revision: 1.3 $  $Date: 2003/05/09 12:32:37 $
34 
35 -------------------------------------------------------------------------*/
36 
37 #include <libtsp/AFpar.h>
38 #include <AO.h>
39 
40 
41 void
AOsetFIopt(const struct AO_FIpar * FI,int NsampND,int RAccess)42 AOsetFIopt (const struct AO_FIpar *FI, int NsampND, int RAccess)
43 
44 {
45   struct AF_opt *AFopt;
46 
47   AFopt = AFoptions ();
48 
49   AFopt->NsampND = NsampND;
50   AFopt->RAccess = RAccess;
51   AFopt->FtypeI = FI->Ftype;
52   AFopt->NHpar = FI->NHpar;
53 
54   return;
55 }
56