BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bsedatahandle-flac.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __BSE_DATA_HANDLE_FLAC_HH__
00003 #define __BSE_DATA_HANDLE_FLAC_HH__
00004 
00005 #include <bse/gslfilehash.hh>
00006 
00007 // == flac datahandle C API ==
00008 GslDataHandle*    bse_data_handle_new_flac          (const char* file_name, float osc_freq);
00009 GslDataHandle*    bse_data_handle_new_flac_zoffset  (const char *file_name, float osc_freq,
00010                                                      int64 byte_offset, int64 byte_size,
00011                                                      uint *n_channelsp, float *mix_freq_p);
00012 
00013 namespace Bse {
00014 
00015 class DataHandleFlac;
00016 
00018 class Flac1Handle
00019 {
00020   GslRFile       *rfile;
00021   GslDataHandle  *dhandle;
00022   DataHandleFlac *flac_handle;
00023   uint            byte_length;
00024   static void destroy_fn (void *handle);
00025   static int read_data_fn (void *handle, void *buffer, uint blength);
00026   Flac1Handle (GslDataHandle *dhandle);
00027 public:
00028   ~Flac1Handle();
00029   int read_data (void *buffer, uint blength);   
00030 
00031   void put_wstore (SfiWStore *wstore);
00033   static Flac1Handle *create (GslDataHandle *dhandle);
00034 };
00035 
00036 } // Bse
00037 
00038 #endif // __BSE_DATA_HANDLE_FLAC_HH
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines