File: File.h

package info (click to toggle)
quickplot 0.8.6-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,544 kB
  • ctags: 1,019
  • sloc: cpp: 10,051; sh: 7,597; makefile: 176
file content (51 lines) | stat: -rw-r--r-- 1,362 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* Copyright (c) 1998, 1999, 2003, 2004  Lance Arsenault, (GNU GPL (v2+))
 */
// For amd64. Why in here I don't know.
#ifdef USE_LIBSNDFILE
#include <sndfile.h>
#endif

class Source;
class FileReader;
class FileList;

class File : public Source
{

public:

  // if filename=NULL then use stdin
  File(const FileList *fileList);
  File(const char *filename);
  
  
private:

  void init(const FileList *fileList);
  
#ifdef USE_LIBSNDFILE
  
  // This will not work with stdin.
  bool readSndFile(const FileList *fileList, int fd=-1);

  void readSndShort  (::SNDFILE *sf, int samplerate,
                      count_t numberOfValues, int channels,
                      const FileList *fileList);
  void readSndInt    (::SNDFILE *sf, int samplerate,
                      count_t numberOfValues, int channels,
                      const FileList *fileList);
  void readSndFloat  (::SNDFILE *sf, int samplerate,
                      count_t numberOfValues, int channels,
                      const FileList *fileList);
  void readSndDouble (::SNDFILE *sf, int samplerate,
                      count_t numberOfValues, int channels,
                      const FileList *fileList);

#endif // #ifdef USE_LIBSNDFILE


  // This will work with stdin.
  bool readASCIIFile(FILE *file, const FileList *fileList);

  int getValue(FileReader *file, value_t *val);
};