BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bstplayback.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 __BST_PLAY_BACK_H__
00003 #define __BST_PLAY_BACK_H__
00004 
00005 #include        "bstutils.hh"
00006 
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #endif /* __cplusplus */
00010 
00011 
00012 /* --- typedefs & structures --- */
00013 typedef void (*BstPlayBackNotify)       (gpointer       data,
00014                                          SfiNum         tick_stamp,
00015                                          guint          pcm_position);
00016 typedef struct
00017 {
00018   SfiProxy project;
00019   SfiProxy snet;
00020   SfiProxy speaker;
00021   SfiProxy wosc1, wosc2;
00022   SfiProxy constant;
00023   guint             current_delay;
00024   guint             pcm_timeout;
00025   BstPlayBackNotify pcm_notify;
00026   gpointer          pcm_data;
00027   guint         waiting_for_notify : 1;
00028   guint         discard_next_notify : 1;
00029 } BstPlayBackHandle;
00030 
00031 
00032 /* --- functions --- */
00033 BstPlayBackHandle* bst_play_back_handle_new             (void);
00034 void               bst_play_back_handle_set             (BstPlayBackHandle      *handle,
00035                                                          SfiProxy                esample,
00036                                                          gdouble                 osc_freq);
00037 void               bst_play_back_handle_start           (BstPlayBackHandle      *handle);
00038 void               bst_play_back_handle_seek_perc       (BstPlayBackHandle      *handle,
00039                                                          gfloat                  perc);
00040 void               bst_play_back_handle_stop            (BstPlayBackHandle      *handle);
00041 void               bst_play_back_handle_toggle          (BstPlayBackHandle      *handle);
00042 void               bst_play_back_handle_pcm_notify      (BstPlayBackHandle      *handle,
00043                                                          guint                   timeout,
00044                                                          BstPlayBackNotify       notify,
00045                                                          gpointer                data);
00046 void               bst_play_back_handle_time_pcm_notify (BstPlayBackHandle      *handle,
00047                                                          guint                   timeout);
00048 gboolean           bst_play_back_handle_is_playing      (BstPlayBackHandle      *handle);
00049 gboolean           bst_play_back_handle_done            (BstPlayBackHandle      *handle);
00050 void               bst_play_back_handle_destroy         (BstPlayBackHandle      *handle);
00051 
00052 
00053 
00054 
00055 #ifdef __cplusplus
00056 }
00057 #endif /* __cplusplus */
00058 
00059 #endif /* __BST_PLAY_BACK_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines