[beast/devel: 17/28] FLAC: added missing header file bsedatahandle-flac.hh
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/devel: 17/28] FLAC: added missing header file bsedatahandle-flac.hh
- Date: Sat, 4 May 2013 03:53:39 +0000 (UTC)
commit 0f08eccd31920eed4e4d78f9965c601b2333fe86
Author: Stefan Westerfeld <stefan space twc de>
Date: Fri Mar 22 15:38:29 2013 +0100
FLAC: added missing header file bsedatahandle-flac.hh
bse/bsedatahandle-flac.hh | 49 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
---
diff --git a/bse/bsedatahandle-flac.hh b/bse/bsedatahandle-flac.hh
new file mode 100644
index 0000000..fa7ff21
--- /dev/null
+++ b/bse/bsedatahandle-flac.hh
@@ -0,0 +1,49 @@
+// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
+#ifndef __BSE_DATA_HANDLE_FLAC_HH__
+#define __BSE_DATA_HANDLE_FLAC_HH__
+
+#include <bse/gslfilehash.hh>
+
+/* --- flac datahandle C API--- */
+GslDataHandle* bse_data_handle_new_flac (const gchar* file_name,
+ gfloat osc_freq);
+GslDataHandle* bse_data_handle_new_flac_zoffset (const gchar *file_name,
+ float osc_freq,
+ GslLong byte_offset,
+ GslLong byte_size,
+ uint *n_channelsp,
+ float *mix_freq_p);
+
+namespace Bse
+{
+
+/* Flac1Handle supports storing flac files as binary appendix */
+class DataHandleFlac;
+class Flac1Handle
+{
+ GslRFile *rfile;
+ GslDataHandle *dhandle;
+ DataHandleFlac *flac_handle;
+ uint byte_length;
+
+ static void destroy_fn (void *handle);
+ static int read_data_fn (void *handle, void *buffer, uint blength);
+
+ Flac1Handle (GslDataHandle *dhandle);
+
+public:
+ ~Flac1Handle();
+
+ /* returns -errno || length */
+ int read_data (void *buffer, uint blength);
+
+ // put_wstore() deletes flac1handle object when sfi_wstore_destroy (wstore) is executed.
+ void put_wstore (SfiWStore *wstore);
+
+ /* returns valid Flac1Handle if dhandle is not flac, Flac1Handle otherwise */
+ static Flac1Handle *create (GslDataHandle *dhandle);
+};
+
+};
+
+#endif /* __BSE_DATA_HANDLE_FLAC_HH */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]