]> Nishi Git Mirror - gwion.git/commitdiff
:art: Renaming
authorfennecdjay <astor.jeremie@wanadoo.fr>
Tue, 12 Mar 2019 19:29:21 +0000 (20:29 +0100)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Tue, 12 Mar 2019 19:29:21 +0000 (20:29 +0100)
include/driver.h
include/gwion.h
include/vm.h
src/gwion.c
src/vm/driver.c

index f9912d336cba2b73bcee8701d78988a2fe361787..d3c88f9386e940b13b1469e3d8c3539c4792e0ae 100644 (file)
@@ -1,17 +1,17 @@
 #ifndef __DRIVER
 #define __DRIVER
-typedef struct BBQ_ DriverInfo;
+
 typedef m_bool (*f_drvini)(VM*, struct BBQ_*);
 typedef void   (*f_drvrun)(VM*, struct BBQ_*);
 typedef void   (*f_drvdel)(VM*, struct BBQ_*);
 
-typedef struct Driver_ {
+typedef struct DriverData_ {
   f_drvini ini;
   f_drvrun run;
   f_drvdel del;
   void* data;
-} Driver;
+} DriverData;
 
-ANN void dummy_driver(Driver*);
-ANN void bbq_alloc(DriverInfo*);
+ANN void dummy_driver(DriverData*);
+ANN void bbq_alloc(struct BBQ_*);
 #endif
index ba3788aba7feaf70ddf64b78ddfc4e7fc2369bb3..da15398620d07db88a8a152b19e987463b7397f9 100644 (file)
@@ -7,7 +7,6 @@ typedef struct Gwion_* Gwion;
 #include "driver.h"
 struct Gwion_ {
   PlugInfo* plug;
-//  DriverInfo* di;
   struct Arg_* arg;
 // sym
 // mem
index 2410880a036d8eb0b0a7754e1a8af73a372e37d3..a7a3a30f65e7bc96f237bf3be4b7b27af1f04f9b 100644 (file)
@@ -26,7 +26,7 @@ struct BBQ_ {
   struct SoundInfo_ *si;
   f_bbqset func;
   f_bbqrun run;
-  struct Driver_* driver;
+  struct DriverData_* driver;
 };
 
 typedef struct Shreduler_* Shreduler;
index dfa4d5cefd52294e6c198dbdb80ac2c4c7383734..07cd3162796cac6171802bfc4dcc5733c6b6d0ab 100644 (file)
 #define VMBENCH_END
 #endif
 
-ANN static DriverInfo* new_driverinfo(void) {
-  DriverInfo *di = (DriverInfo*)xcalloc(1, sizeof(DriverInfo));
+ANN static struct BBQ_ * new_driverinfo(void) {
+  struct BBQ_ * di = (struct BBQ*)xcalloc(1, sizeof(struct BBQ_));
   di->func = dummy_driver;
   di->run = vm_run;
-  di->driver = (Driver*)xcalloc(1, sizeof(Driver));
+  di->driver = (DriverData*)xcalloc(1, sizeof(DriverData));
   return di;
 }
 
@@ -43,7 +43,7 @@ ANN static Arg* new_arg(int argc, char** argv) {
 }
 
 ANN m_bool gwion_audio(const Gwion gwion) {
-  DriverInfo *di = gwion->vm->bbq;
+  struct BBQ_ *di = gwion->vm->bbq;
   // get driver from string.
   if(di->si->arg) {
     for(m_uint i = 0; i < map_size(&gwion->plug->drv); ++i) {
@@ -103,7 +103,7 @@ ANN void gwion_run(const Gwion gwion) {
   VMBENCH_END
 }
 
-ANN /* static */ void free_driverinfo(DriverInfo* di, VM* vm) {
+ANN /* static */ void free_driverinfo(struct BBQ_* di, VM* vm) {
   mp_free(SoundInfo, di->si);
   if(di->driver->del)
     di->driver->del(vm, di);
@@ -117,7 +117,6 @@ ANN void gwion_end(const Gwion gwion) {
   free_env(gwion->env);
   free_emitter(gwion->emit);
   free_vm(gwion->vm);
-//  free_driverinfo(gwion->vm->bbq, gwion->vm);
   xfree(gwion->plug);
   free_symbols();
 }
index c4800e8e6c50f14d675521c9e2b0b684830c9e39..3a3f6117d5fcb57467139a3a64ba9d809cf5fd4c 100644 (file)
 #include "driver.h"
 #include "sound.h"
 
-ANN void bbq_alloc(DriverInfo* di) {
-  struct BBQ_* bbq   = (struct BBQ_*)di;
-  bbq->out = (m_float*)xcalloc(di->si->out, SZ_FLOAT);
-  bbq->in  = (m_float*)xcalloc(di->si->in, SZ_FLOAT);
+ANN void bbq_alloc(struct BBQ_ *bbq) {
+  bbq->out = (m_float*)xcalloc(bbq->si->out, SZ_FLOAT);
+  bbq->in  = (m_float*)xcalloc(bbq->si->in, SZ_FLOAT);
 }
 
-static void dummy_run(VM* vm, DriverInfo* di) {
+static void dummy_run(VM* vm, struct BBQ_* di) {
   while(di->is_running) {
     di->run(vm);
     ++di->pos;
   }
 }
 
-static m_bool dummy_ini(VM* vm __attribute__((unused)), DriverInfo* di __attribute__((unused))) {
+static m_bool dummy_ini(VM* vm __attribute__((unused)), struct BBQ_* di __attribute__((unused))) {
   return GW_OK;
 }
 
-void dummy_driver(Driver* d) {
+void dummy_driver(DriverData* d) {
   d->ini = dummy_ini;
   d->run = dummy_run;
 }