Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

filesndfile.h

Go to the documentation of this file.
00001 #ifndef FILESNDFILE_H
00002 #define FILESNDFILE_H
00003 
00004 #include "bitspopup.inc"
00005 #include "filebase.h"
00006 #include "filesndfile.h"
00007 #include "sndfile.h"
00008 
00009 #include <stdio.h>
00010 
00011 // The following libsndfile files have to be modified to support VFS.
00012 // They need to use FILE * instead of file descriptors.
00013 // open doesn't seem to be overridable.
00014 // file_io.c
00015 // sndfile.c
00016 // sndfile.h
00017 
00018 class FileSndFile : public FileBase
00019 {
00020 public:
00021         FileSndFile(Asset *asset, File *file);
00022         ~FileSndFile();
00023 
00024         static int check_sig(Asset *asset);
00025         int open_file(int rd, int wr);
00026         int close_file();
00027         int set_audio_position(int64_t sample);
00028         int read_samples(double *buffer, int64_t len);
00029         int write_samples(double **buffer, int64_t len);
00030         void format_to_asset();
00031         void asset_to_format();
00032 
00033         static void get_parameters(BC_WindowBase *parent_window, 
00034                 Asset *asset, 
00035                 BC_WindowBase* &format_window,
00036                 int audio_options,
00037                 int video_options);
00038 
00039         SNDFILE *fd;
00040         SF_INFO fd_config;
00041 // Temp for interleaved channels
00042         double *temp_double;
00043         int64_t temp_allocated;
00044 };
00045 
00046 class SndFileConfig;
00047 
00048 class SndFileHILO : public BC_Radial
00049 {
00050 public:
00051         SndFileHILO(SndFileConfig *gui, int x, int y);
00052         int handle_event();
00053         SndFileConfig *gui;
00054 };
00055 
00056 class SndFileLOHI : public BC_Radial
00057 {
00058 public:
00059         SndFileLOHI(SndFileConfig *gui, int x, int y);
00060         int handle_event();
00061         SndFileConfig *gui;
00062 };
00063 
00064 
00065 class SndFileConfig : public BC_Window
00066 {
00067 public:
00068         SndFileConfig(BC_WindowBase *parent_window, Asset *asset);
00069         ~SndFileConfig();
00070 
00071         int create_objects();
00072         int close_event();
00073 
00074         BC_WindowBase *parent_window;
00075         BitsPopup *bits_popup;
00076         SndFileHILO *hilo;
00077         SndFileLOHI *lohi;
00078         Asset *asset;
00079 };
00080 
00081 #endif

Generated on Sun Jan 8 13:38:55 2006 for Cinelerra-svn by  doxygen 1.4.4