Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bsepcmwriter.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_PCM_WRITER_H__
3 #define __BSE_PCM_WRITER_H__
4 
5 #include <bse/bseitem.hh>
6 
7 /* --- object type macros --- */
8 #define BSE_TYPE_PCM_WRITER (BSE_TYPE_ID (BsePcmWriter))
9 #define BSE_PCM_WRITER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_PCM_WRITER, BsePcmWriter))
10 #define BSE_PCM_WRITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_PCM_WRITER, BsePcmWriterClass))
11 #define BSE_IS_PCM_WRITER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_PCM_WRITER))
12 #define BSE_IS_PCM_WRITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_PCM_WRITER))
13 #define BSE_PCM_WRITER_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_PCM_WRITER, BsePcmWriterClass))
14 
15 
16 /* --- BsePcmWriter --- */
18  Bse::Mutex mutex;
19  guint open : 1;
20  guint broken : 1;
21  gint fd;
22  Bse::uint64 n_bytes;
23  Bse::uint64 recorded_maximum;
24  Bse::uint64 start_tick;
25 };
27 {};
28 
29 Bse::Error bse_pcm_writer_open (BsePcmWriter *pdev, const gchar *file, guint n_channels,
30  guint sample_freq, Bse::uint64 recorded_maximum);
31 void bse_pcm_writer_close (BsePcmWriter *pdev);
32 /* writing is lock protected */
33 void bse_pcm_writer_write (BsePcmWriter *pdev, size_t n_values,
34  const float *values, Bse::uint64 start_stamp);
35 
36 namespace Bse {
37 
38 class PcmWriterImpl : public ItemImpl, public virtual PcmWriterIface {
39 protected:
40  virtual ~PcmWriterImpl ();
41 public:
42  explicit PcmWriterImpl (BseObject*);
43  static void trigger_tick (uint64 start_tick);
44 };
45 
46 } // Bse
47 
48 #endif /* __BSE_PCM_WRITER_H__ */
The Bse namespace contains all functions of the synthesis engine.
Definition: bstbseutils.cc:91
Definition: bsepcmwriter.hh:17
Definition: bseobject.hh:57
Definition: bseitem.hh:148
Definition: bsepcmwriter.hh:38
Definition: bseitem.hh:37
Definition: bsepcmwriter.hh:26
uint64_t uint64
Definition: bseitem.hh:32