Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bsedatahandle-flac.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BSE_DATA_HANDLE_FLAC_HH__
3 #define __BSE_DATA_HANDLE_FLAC_HH__
4 
5 #include <bse/gslfilehash.hh>
6 
7 // == flac datahandle C API ==
8 GslDataHandle* bse_data_handle_new_flac (const char* file_name, float osc_freq);
9 GslDataHandle* bse_data_handle_new_flac_zoffset (const char *file_name, float osc_freq,
10  int64 byte_offset, int64 byte_size,
11  uint *n_channelsp, float *mix_freq_p);
12 
13 namespace Bse {
14 
15 class DataHandleFlac;
16 
19 {
20  GslRFile *rfile;
21  GslDataHandle *dhandle;
22  DataHandleFlac *flac_handle;
23  uint byte_length;
24  static void destroy_fn (void *handle);
25  static int read_data_fn (void *handle, void *buffer, uint blength);
26  Flac1Handle (GslDataHandle *dhandle);
27 public:
28  ~Flac1Handle();
29  int read_data (void *buffer, uint blength);
30  void put_wstore (SfiWStore *wstore);
33  static Flac1Handle *create (GslDataHandle *dhandle);
34 };
35 
36 } // Bse
37 
38 #endif // __BSE_DATA_HANDLE_FLAC_HH
The Bse namespace contains all functions of the synthesis engine.
Definition: bstbseutils.cc:91
Definition: gslfilehash.hh:22
Flac1Handle supports storing flac files as binary appendix to BSE files.
Definition: bsedatahandle-flac.hh:18
static Flac1Handle * create(GslDataHandle *dhandle)
Return a valid Flac1Handle if dhandle is not flac, and a Flac1Handle otherwise.
Definition: bsedatahandle-flac.cc:380
int64_t int64
void put_wstore(SfiWStore *wstore)
This function deletes the flac1handle object when sfi_wstore_destroy (wstore) is executed.
Definition: bsedatahandle-flac.cc:450
Definition: sfistore.hh:12
int read_data(void *buffer, uint blength)
Returns -errno || length.
Definition: bsedatahandle-flac.cc:426