r999: maintainers added to README_en.
[cinelerra_cv/mob.git] / cinelerra / filesndfile.h
blobdc4b6ed0ebaec9a9858958fd8f532713ab8fc408
1 #ifndef FILESNDFILE_H
2 #define FILESNDFILE_H
4 #include "bitspopup.inc"
5 #include "filebase.h"
6 #include "filesndfile.h"
7 #include "sndfile.h"
9 #include <stdio.h>
11 // The following libsndfile files have to be modified to support VFS.
12 // They need to use FILE * instead of file descriptors.
13 // open doesn't seem to be overridable.
14 // file_io.c
15 // sndfile.c
16 // sndfile.h
18 class FileSndFile : public FileBase
20 public:
21 FileSndFile(Asset *asset, File *file);
22 ~FileSndFile();
24 static int check_sig(Asset *asset);
25 int open_file(int rd, int wr);
26 int close_file();
27 int set_audio_position(int64_t sample);
28 int read_samples(double *buffer, int64_t len);
29 int write_samples(double **buffer, int64_t len);
30 void format_to_asset();
31 void asset_to_format();
33 static void get_parameters(BC_WindowBase *parent_window,
34 Asset *asset,
35 BC_WindowBase* &format_window,
36 int audio_options,
37 int video_options);
39 SNDFILE *fd;
40 SF_INFO fd_config;
41 // Temp for interleaved channels
42 double *temp_double;
43 int64_t temp_allocated;
46 class SndFileConfig;
48 class SndFileHILO : public BC_Radial
50 public:
51 SndFileHILO(SndFileConfig *gui, int x, int y);
52 int handle_event();
53 SndFileConfig *gui;
56 class SndFileLOHI : public BC_Radial
58 public:
59 SndFileLOHI(SndFileConfig *gui, int x, int y);
60 int handle_event();
61 SndFileConfig *gui;
65 class SndFileConfig : public BC_Window
67 public:
68 SndFileConfig(BC_WindowBase *parent_window, Asset *asset);
69 ~SndFileConfig();
71 int create_objects();
72 int close_event();
74 BC_WindowBase *parent_window;
75 BitsPopup *bits_popup;
76 SndFileHILO *hilo;
77 SndFileLOHI *lohi;
78 Asset *asset;
81 #endif