diff --git a/cli/rtbuf_cli.c b/cli/rtbuf_cli.c
index c253862..e8212c0 100644
--- a/cli/rtbuf_cli.c
+++ b/cli/rtbuf_cli.c
@@ -232,7 +232,7 @@ void * rtbuf_cli_run_thread_proc (void *arg)
return 0;
}
-int rtbuf_cli_start ()
+int rtbuf_cli_start (void)
{
if (!g_rtbuf_run && g_rtbuf_cli_run_thread) {
if (pthread_join(g_rtbuf_cli_run_thread, 0))
@@ -255,7 +255,7 @@ int rtbuf_cli_start_ (int argc, const char *argv[])
return rtbuf_cli_start();
}
-int rtbuf_cli_stop ()
+int rtbuf_cli_stop (void)
{
if (g_rtbuf_run)
g_rtbuf_run = 0;
@@ -355,7 +355,7 @@ void debug_read (int argc, const char **argv, f_cli f)
}
}
-void repl_init ()
+void repl_init (void)
{
cli_init(&g_cli);
cli_prompt(&g_cli, "rtbuf> ");
@@ -374,7 +374,7 @@ int load (const char *path)
return 0;
}
-int repl ()
+int repl (void)
{
while (cli_read(&g_cli) >= 0) {
/* debug_read(cli.argc, cli.argv, cli.f); */
@@ -383,7 +383,7 @@ int repl ()
return 0;
}
-int rtbuf_cli_do_event ()
+int rtbuf_cli_do_event (void)
{
if (cli_read_nonblocking(&g_cli) >= 0) {
/* debug_read(cli.argc, cli.argv, cli.f); */
diff --git a/cli/rtbuf_cli.h b/cli/rtbuf_cli.h
index f5a57f7..6021ebc 100644
--- a/cli/rtbuf_cli.h
+++ b/cli/rtbuf_cli.h
@@ -22,14 +22,14 @@ extern f_rtbuf_position g_rtbuf_position_cb;
extern pthread_t g_rtbuf_cli_run_thread;
int rtbuf_cli_exit (int argc, const char *argv[]);
-void repl_init ();
+void repl_init (void);
int load (const char *path);
-int repl ();
+int repl (void);
void rtbuf_cli_args (int argc, char *argv[]);
-int rtbuf_cli_start ();
-int rtbuf_cli_stop ();
+int rtbuf_cli_start (void);
+int rtbuf_cli_stop (void);
-int rtbuf_cli_do_event ();
+int rtbuf_cli_do_event (void);
#endif /* RTBUF_CLI_H */
diff --git a/gtk3/queue.c b/gtk3/queue.c
index 2830aa7..3aba9fa 100644
--- a/gtk3/queue.c
+++ b/gtk3/queue.c
@@ -32,7 +32,7 @@ void queue_destroy (s_queue *q)
q->length = 0;
}
-s_queue * queue_new ()
+s_queue * queue_new (void)
{
s_queue *q = malloc(sizeof(s_queue));
if (q)
diff --git a/gtk3/queue.h b/gtk3/queue.h
index 10e5a01..a911547 100644
--- a/gtk3/queue.h
+++ b/gtk3/queue.h
@@ -26,7 +26,7 @@ struct queue {
void queue_init (s_queue *q);
void queue_destroy (s_queue *q);
-s_queue * queue_new ();
+s_queue * queue_new (void);
void queue_delete (s_queue *q);
void queue_enqueue (s_queue *q, void *item);
void * queue_dequeue (s_queue *q);
diff --git a/gtk3/rtbuf_gtk3.c b/gtk3/rtbuf_gtk3.c
index f010d16..771f842 100644
--- a/gtk3/rtbuf_gtk3.c
+++ b/gtk3/rtbuf_gtk3.c
@@ -178,7 +178,7 @@ void rtbuf_gtk_destroy (GtkWidget *widget, gpointer data)
gtk_widget_destroy(widget);
}
-void rtbuf_gtk_library_menu ()
+void rtbuf_gtk_library_menu (void)
{
if (!library_menu)
library_menu = GTK_MENU(gtk_builder_get_object(builder,
@@ -393,7 +393,7 @@ void rtbuf_gtk_modular_stop (GtkWidget *widget, gpointer data)
rtbuf_cli_stop();
}
-void rtbuf_gtk_modular_toolbar ()
+void rtbuf_gtk_modular_toolbar (void)
{
GtkWidget *image;
GtkToolItem *item;
@@ -417,7 +417,7 @@ void rtbuf_gtk_modular_toolbar ()
gtk_toolbar_insert(modular_toolbar, item, -1);
}
-void rtbuf_gtk_modular ()
+void rtbuf_gtk_modular (void)
{
GObject *button;
@@ -446,10 +446,10 @@ void rtbuf_gtk_modular ()
G_CALLBACK(rtbuf_gtk_modular_motion), NULL);
}
-int rtbuf_gtk_builder ()
+int rtbuf_gtk_builder (void)
{
GError *error = NULL;
- builder = gtk_builder_new ();
+ builder = gtk_builder_new();
if (gtk_builder_add_from_resource(builder, "/rtbuf/rtbuf_gtk3_modular.ui",
&error) == 0) {
g_printerr("Error loading resource /rtbuf/rtbuf_gtk3_modular.ui: %s\n",
@@ -460,13 +460,13 @@ int rtbuf_gtk_builder ()
return 0;
}
-void rtbuf_gtk_lock ()
+void rtbuf_gtk_lock (void)
{
if (pthread_equal(pthread_self(), g_rtbuf_cli_run_thread))
g_mutex_lock(&g_mutex);
}
-void rtbuf_gtk_unlock ()
+void rtbuf_gtk_unlock (void)
{
if (pthread_equal(pthread_self(), g_rtbuf_cli_run_thread))
g_mutex_unlock(&g_mutex);
diff --git a/gtk3/rtbuf_gtk3_connection.c b/gtk3/rtbuf_gtk3_connection.c
index 96dbd09..4f087d5 100644
--- a/gtk3/rtbuf_gtk3_connection.c
+++ b/gtk3/rtbuf_gtk3_connection.c
@@ -21,14 +21,14 @@ s_data_type g_rtbuf_gtk_connection_type = {
};
s_data_alloc g_rtbuf_gtk_connection_alloc;
-void rtbuf_gtk_connection_init ()
+void rtbuf_gtk_connection_init (void)
{
data_alloc_init(&g_rtbuf_gtk_connection_alloc,
&g_rtbuf_gtk_connection_type,
RTBUF_MAX * 10, NULL, NULL);
}
-s_rtbuf_gtk_connection * rtbuf_gtk_connection_new ()
+s_rtbuf_gtk_connection * rtbuf_gtk_connection_new (void)
{
s_rtbuf_gtk_connection *connection = data_new(&g_rtbuf_gtk_connection_alloc);
return connection;
diff --git a/gtk3/rtbuf_gtk3_connection.h b/gtk3/rtbuf_gtk3_connection.h
index cac9abd..85fe7d7 100644
--- a/gtk3/rtbuf_gtk3_connection.h
+++ b/gtk3/rtbuf_gtk3_connection.h
@@ -25,8 +25,8 @@ struct rtbuf_gtk_connection {
s_rtbuf_gtk_connection *next;
};
-void rtbuf_gtk_connection_init ();
-s_rtbuf_gtk_connection * rtbuf_gtk_connection_new ();
+void rtbuf_gtk_connection_init (void);
+s_rtbuf_gtk_connection * rtbuf_gtk_connection_new (void);
void rtbuf_gtk_connection_delete (s_rtbuf_gtk_connection *connection);
void rtbuf_gtk_connection_push (s_rtbuf_gtk_connection **head,
diff --git a/gtk3/rtbuf_gtk3_library.c b/gtk3/rtbuf_gtk3_library.c
index 193c81e..3424817 100644
--- a/gtk3/rtbuf_gtk3_library.c
+++ b/gtk3/rtbuf_gtk3_library.c
@@ -189,7 +189,7 @@ void rtbuf_gtk_library_load_directory (const char *path, size_t prefix_len)
}
}
-void rtbuf_gtk_library_load ()
+void rtbuf_gtk_library_load (void)
{
char **path = g_rtbuf_lib_path;
if (g_rtbuf_gtk_library_tree) {
diff --git a/gtk3/rtbuf_gtk3_library.h b/gtk3/rtbuf_gtk3_library.h
index d00c504..021a27f 100644
--- a/gtk3/rtbuf_gtk3_library.h
+++ b/gtk3/rtbuf_gtk3_library.h
@@ -28,6 +28,6 @@ struct rtbuf_gtk_library_tree {
extern s_rtbuf_gtk_library_tree *g_rtbuf_gtk_library_tree;
-void rtbuf_gtk_library_load ();
+void rtbuf_gtk_library_load (void);
#endif /* RTBUF_GTK_LIBRARY_H */
diff --git a/gtk3/rtbuf_gtk3_rtbuf_info.c b/gtk3/rtbuf_gtk3_rtbuf_info.c
index 78d013c..47f7433 100644
--- a/gtk3/rtbuf_gtk3_rtbuf_info.c
+++ b/gtk3/rtbuf_gtk3_rtbuf_info.c
@@ -22,14 +22,14 @@ s_data_type g_rtbuf_gtk_rtbuf_info_type = {
s_data_alloc g_rtbuf_gtk_rtbuf_info_alloc;
-void rtbuf_gtk_rtbuf_info_init ()
+void rtbuf_gtk_rtbuf_info_init (void)
{
data_alloc_init(&g_rtbuf_gtk_rtbuf_info_alloc,
&g_rtbuf_gtk_rtbuf_info_type,
RTBUF_MAX, 0, 0);
}
-s_rtbuf_gtk_rtbuf_info *rtbuf_gtk_rtbuf_info_new ()
+s_rtbuf_gtk_rtbuf_info *rtbuf_gtk_rtbuf_info_new (void)
{
s_rtbuf_gtk_rtbuf_info *info =
data_new(&g_rtbuf_gtk_rtbuf_info_alloc);
diff --git a/gtk3/rtbuf_gtk3_rtbuf_info.h b/gtk3/rtbuf_gtk3_rtbuf_info.h
index e026ded..a07f3d5 100644
--- a/gtk3/rtbuf_gtk3_rtbuf_info.h
+++ b/gtk3/rtbuf_gtk3_rtbuf_info.h
@@ -26,8 +26,8 @@ typedef struct rtbuf_gtk_rtbuf_info {
RtbufOutputWidget *out[RTBUF_PROC_OUT_MAX];
} s_rtbuf_gtk_rtbuf_info;
-void rtbuf_gtk_rtbuf_info_init ();
-s_rtbuf_gtk_rtbuf_info *rtbuf_gtk_rtbuf_info_new ();
+void rtbuf_gtk_rtbuf_info_init (void);
+s_rtbuf_gtk_rtbuf_info *rtbuf_gtk_rtbuf_info_new (void);
void rtbuf_gtk_rtbuf_info_delete (s_rtbuf_gtk_rtbuf_info *info);
#endif /* RTBUF_GTK_RTBUF_INFO_H */
diff --git a/lib/music.c b/lib/music.c
index 57f34c5..403b4e3 100644
--- a/lib/music.c
+++ b/lib/music.c
@@ -20,7 +20,7 @@
int g_rtbuf_music_init = 0;
double g_rtbuf_music_tune = 0.0;
-int rtbuf_music_init ()
+int rtbuf_music_init (void)
{
double tune_c;
if (g_rtbuf_music_init)
diff --git a/lib/music.h b/lib/music.h
index 7b59a7e..7399ce4 100644
--- a/lib/music.h
+++ b/lib/music.h
@@ -73,7 +73,7 @@ typedef struct rtbuf_music_notes {
#define RTBUF_MUSIC_NOTES_SIZE sizeof(unsigned int)
#define RTBUF_MUSIC_NOTES_TYPE "music_notes"
-int rtbuf_music_init ();
+int rtbuf_music_init (void);
void rtbuf_music_notes_init (s_rtbuf_music_notes *notes);
int rtbuf_music_notes_new (s_rtbuf_music_notes *notes, double velocity);
void rtbuf_music_notes_delete (s_rtbuf_music_notes *notes,
diff --git a/lib/music_type.c b/lib/music_type.c
index 1666c5e..a45cb35 100644
--- a/lib/music_type.c
+++ b/lib/music_type.c
@@ -15,7 +15,7 @@
#include "../librtbuf/rtbuf.h"
#include "music.h"
-void notes_in ()
+void notes_in (void)
{
unsigned int i = 0;
const char *st = "RTBUF_SIGNAL_SAMPLE_TYPE";
@@ -50,7 +50,7 @@ void notes_in ()
}
}
-void notes_out ()
+void notes_out (void)
{
unsigned int i = 0;
const char *st = "RTBUF_SIGNAL_SAMPLE_TYPE";
@@ -70,7 +70,7 @@ void notes_out ()
}
}
-int main ()
+int main (void)
{
printf("/* file generated by rtbuf_music_type */\n");
printf("#ifndef RTBUF_MUSIC_TYPE_H\n"
diff --git a/lib/portaudio/config.c b/lib/portaudio/config.c
index 6b2b48e..a57f3ea 100644
--- a/lib/portaudio/config.c
+++ b/lib/portaudio/config.c
@@ -13,7 +13,7 @@
*/
#include <portaudio.h>
-int main ()
+int main (void)
{
return 0;
}
diff --git a/lib/portaudio_type.c b/lib/portaudio_type.c
index 0a6e41e..0741069 100644
--- a/lib/portaudio_type.c
+++ b/lib/portaudio_type.c
@@ -15,7 +15,7 @@
#include "../librtbuf/rtbuf.h"
#include "portaudio.h"
-int main ()
+int main (void)
{
printf("/* file generated by rtbuf_portaudio_type */\n");
printf("#ifndef RTBUF_PORTAUDIO_TYPE_H\n"
diff --git a/lib/reverb_type.c b/lib/reverb_type.c
index 0804c41..8f96a48 100644
--- a/lib/reverb_type.c
+++ b/lib/reverb_type.c
@@ -15,7 +15,7 @@
#include "../librtbuf/rtbuf.h"
#include "reverb.h"
-int main ()
+int main (void)
{
printf("/* file generated by rtbuf_reverb_type */\n");
printf("#ifndef RTBUF_REVERB_TYPE_H\n"
diff --git a/lib/signal_type.c b/lib/signal_type.c
index 14c5f6a..f218c5a 100644
--- a/lib/signal_type.c
+++ b/lib/signal_type.c
@@ -15,7 +15,7 @@
#include "../librtbuf/rtbuf.h"
#include "signal.h"
-int main ()
+int main (void)
{
printf("/* file generated by rtbuf_signal_type */\n");
printf("#ifndef RTBUF_SIGNAL_TYPE_H\n"
diff --git a/lib/sndio/check_sndio.c b/lib/sndio/check_sndio.c
index 3b13449..cbc5e92 100644
--- a/lib/sndio/check_sndio.c
+++ b/lib/sndio/check_sndio.c
@@ -13,7 +13,7 @@
*/
#include <sndio.h>
-int main ()
+int main (void)
{
struct sio_hdl *sio_hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
sio_close(sio_hdl);
diff --git a/lib/sndio/config.c b/lib/sndio/config.c
index 8a3e3af..4c761de 100644
--- a/lib/sndio/config.c
+++ b/lib/sndio/config.c
@@ -13,7 +13,7 @@
*/
#include <sndio.h>
-int main ()
+int main (void)
{
return 0;
}
diff --git a/lib/sndio_type.c b/lib/sndio_type.c
index 2a179ee..5d5e6b3 100644
--- a/lib/sndio_type.c
+++ b/lib/sndio_type.c
@@ -15,7 +15,7 @@
#include "../librtbuf/rtbuf.h"
#include "sndio.h"
-int main ()
+int main (void)
{
printf("/* file generated by rtbuf_sndio_type */\n");
printf("#ifndef RTBUF_SNDIO_TYPE_H\n"
diff --git a/lib/synth_type.c b/lib/synth_type.c
index 3676d9c..713c78e 100644
--- a/lib/synth_type.c
+++ b/lib/synth_type.c
@@ -16,7 +16,7 @@
#include "music.h"
#include "music_type.h"
-void notes_in ()
+void notes_in (void)
{
unsigned int i = 0;
const char *st = "RTBUF_SIGNAL_TYPE";
@@ -43,7 +43,7 @@ void notes_in ()
}
}
-int main ()
+int main (void)
{
printf("/* file generated by rtbuf_synth_type */\n");
printf("#ifndef RTBUF_SYNTH_TYPE_H\n"
diff --git a/librtbuf/data.c b/librtbuf/data.c
index a5b67fa..11ea609 100644
--- a/librtbuf/data.c
+++ b/librtbuf/data.c
@@ -30,7 +30,7 @@ s_data_type g_data_type_type = {
s_data_alloc *g_data_type_alloc = NULL;
u_data_type *g_data_type = NULL;
-int libdata_init ()
+int libdata_init (void)
{
data_alloc_init(&g_data_alloc_alloc, &g_data_alloc_type,
DATA_ALLOC_MAX, 0, (f_data_clean*) data_alloc_clean);
@@ -42,7 +42,7 @@ int libdata_init ()
return 0;
}
-void libdata_shutdown ()
+void libdata_shutdown (void)
{
if (g_data_alloc) {
data_alloc_delete_all();
@@ -150,7 +150,7 @@ void data_alloc_delete (s_data_alloc *da)
data_delete(&g_data_alloc_alloc, da);
}
-void data_alloc_delete_all ()
+void data_alloc_delete_all (void)
{
unsigned i = 0;
int n = g_data_alloc_alloc.n;
diff --git a/librtbuf/data.h b/librtbuf/data.h
index b2c08e9..0967c40 100644
--- a/librtbuf/data.h
+++ b/librtbuf/data.h
@@ -92,9 +92,9 @@ s_data_alloc * data_alloc_new (s_data_type *t,
unsigned int max, f_data_init *init,
f_data_clean *clean);
void data_alloc_delete (s_data_alloc *da);
-void data_alloc_delete_all ();
+void data_alloc_delete_all (void);
-int libdata_init ();
-void libdata_shutdown ();
+int libdata_init (void);
+void libdata_shutdown (void);
#endif
diff --git a/librtbuf/lib.h b/librtbuf/lib.h
index d4bcf55..2418d0c 100644
--- a/librtbuf/lib.h
+++ b/librtbuf/lib.h
@@ -88,12 +88,12 @@ extern s_data_alloc g_rtbuf_lib_alloc;
extern s_rtbuf_lib *g_rtbuf_lib;
void rtbuf_lib_delete (s_rtbuf_lib *rl);
-void rtbuf_lib_delete_all ();
+void rtbuf_lib_delete_all (void);
int rtbuf_lib_find (const char *str);
-void rtbuf_lib_init_ ();
-void rtbuf_lib_shutdown ();
+void rtbuf_lib_init_ (void);
+void rtbuf_lib_shutdown (void);
s_rtbuf_lib * rtbuf_lib_load (const char *path);
-s_rtbuf_lib * rtbuf_lib_new ();
+s_rtbuf_lib * rtbuf_lib_new (void);
void rtbuf_lib_print (const s_rtbuf_lib *lib);
void rtbuf_lib_print_long (unsigned int i);
diff --git a/librtbuf/proc.h b/librtbuf/proc.h
index d9962da..702dc37 100644
--- a/librtbuf/proc.h
+++ b/librtbuf/proc.h
@@ -61,14 +61,14 @@ extern s_data_alloc g_rtbuf_proc_alloc;
extern s_rtbuf_proc *g_rtbuf_proc;
void rtbuf_proc_delete (s_rtbuf_proc *proc);
-void rtbuf_proc_delete_all ();
+void rtbuf_proc_delete_all (void);
s_rtbuf_proc * rtbuf_proc_find (const char *x);
-void rtbuf_proc_init ();
-s_rtbuf_proc * rtbuf_proc_new ();
+void rtbuf_proc_init (void);
+s_rtbuf_proc * rtbuf_proc_new (void);
int rtbuf_proc_out_find (s_rtbuf_proc *proc,
const char *name);
int rtbuf_proc_p (s_rtbuf_proc *proc);
void rtbuf_proc_print (s_rtbuf_proc *proc);
-void rtbuf_proc_shutdown ();
+void rtbuf_proc_shutdown (void);
#endif
diff --git a/librtbuf/rtbuf.c b/librtbuf/rtbuf.c
index 402f907..5be276b 100644
--- a/librtbuf/rtbuf.c
+++ b/librtbuf/rtbuf.c
@@ -44,7 +44,7 @@ f_rtbuf_delete_cb g_rtbuf_delete_cb = 0;
f_rtbuf_bind_cb g_rtbuf_bind_cb = 0;
f_rtbuf_unbind_cb g_rtbuf_unbind_cb = 0;
-int librtbuf_init ()
+int librtbuf_init (void)
{
libdata_init();
bzero(g_rtbuf_sorted, sizeof(g_rtbuf_sorted));
@@ -58,7 +58,7 @@ int librtbuf_init ()
return 0;
}
-void librtbuf_shutdown ()
+void librtbuf_shutdown (void)
{
rtbuf_var_shutdown();
rtbuf_lib_shutdown();
@@ -207,7 +207,7 @@ void rtbuf_unbind_all_out (s_rtbuf *rtb)
assert(g_rtbuf <= rtb);
assert(rtb < g_rtbuf + RTBUF_MAX);
rtb_i = rtb - g_rtbuf;
- while (i < g_rtbuf_alloc.n && rtb->refc) {
+ while (i < g_rtbuf_alloc.n && n && rtb->refc) {
if (g_rtbuf[i].data) {
rtbuf_unbind_all_out_rtbuf(rtb, rtb_i, &g_rtbuf[i]);
n--;
@@ -357,17 +357,17 @@ void rtbuf_find_roots (s_rtbuf_in_stack *rvs)
s_rtbuf *rtb = g_rtbuf;
unsigned int i = 0;
unsigned int n = g_rtbuf_alloc.n - g_rtbuf_alloc.free_n;
- unsigned int c = 0;
- /* printf("rtbuf_find_roots\n"); */
- while (i < g_rtbuf_alloc.n && n > 0) {
- /* printf(" rtbuf_find_roots %u %u\n", i, n); */
+ // unsigned int c = 0;
+ // printf("rtbuf_find_roots\n");
+ while (i < g_rtbuf_alloc.n && n) {
+ // printf(" rtbuf_find_roots %u %u\n", i, n);
if (rtb->data) {
if (rtb->flags & RTBUF_DELETE)
rtbuf_delete_(rtb);
else {
if (rtb->refc == 0) {
rtbuf_in_stack_push(rvs, i, 0);
- c++;
+ // c++;
}
}
n--;
@@ -375,7 +375,7 @@ void rtbuf_find_roots (s_rtbuf_in_stack *rvs)
rtb++;
i++;
}
- /* printf(" rtbuf_find_roots => %u\n", c); */
+ // printf(" rtbuf_find_roots => %u\n", c);
}
/* XXX needs rewrite */
@@ -406,7 +406,7 @@ void rtbuf_sort_push_child (s_rtbuf_in_stack *rvs,
}
/* XXX needs rewrite */
-void rtbuf_sort ()
+void rtbuf_sort (void)
{
s_rtbuf_in_stack rvs;
s_rtbuf_in_ptr *ptr;
@@ -428,7 +428,7 @@ void rtbuf_sort ()
rtbuf_print_sorted();
}
-int rtbuf_start ()
+int rtbuf_start (void)
{
unsigned int i = 0;
/* printf("rtbuf_start\n"); */
@@ -452,7 +452,7 @@ int rtbuf_start ()
return 0;
}
-int rtbuf_run ()
+int rtbuf_run (void)
{
unsigned int i = 0;
/* printf("rtbuf_run\n"); */
@@ -484,7 +484,7 @@ int rtbuf_run ()
return 0;
}
-void rtbuf_stop ()
+void rtbuf_stop (void)
{
unsigned int i = 0;
/* printf("rtbuf_stop\n"); */
@@ -635,7 +635,7 @@ void rtbuf_print_long (const s_rtbuf *rtbuf)
fflush(stdout);
}
-void rtbuf_print_sorted ()
+void rtbuf_print_sorted (void)
{
unsigned int i = 0;
while (i < g_rtbuf_sorted_n) {
diff --git a/librtbuf/rtbuf.h b/librtbuf/rtbuf.h
index 6a00531..1f232d4 100644
--- a/librtbuf/rtbuf.h
+++ b/librtbuf/rtbuf.h
@@ -168,7 +168,7 @@ extern f_rtbuf_unbind_cb g_rtbuf_unbind_cb;
*
* @sa librtbuf_shutdown
*/
-int librtbuf_init ();
+int librtbuf_init (void);
/**
* @brief Shutdown librtbuf.
@@ -178,7 +178,7 @@ int librtbuf_init ();
*
* @sa librtbuf_init
*/
-void librtbuf_shutdown ();
+void librtbuf_shutdown (void);
int rtbuf_err (const char *msg);
@@ -220,13 +220,13 @@ void rtbuf_bind (unsigned int src, unsigned int out,
int rtbuf_out_find (s_rtbuf *rtb, symbol sym);
int rtbuf_data_set (s_rtbuf *rtb, symbol name, void *value,
unsigned int size);
-void rtbuf_sort ();
-int rtbuf_start ();
-int rtbuf_run ();
-void rtbuf_stop ();
+void rtbuf_sort (void);
+int rtbuf_start (void);
+int rtbuf_run (void);
+void rtbuf_stop (void);
void rtbuf_print (const s_rtbuf *rtbuf);
void rtbuf_print_long (const s_rtbuf *rtbuf);
-void rtbuf_print_sorted ();
+void rtbuf_print_sorted (void);
int rtbuf_out_int (s_rtbuf *rtb, unsigned int out, int default_value);
diff --git a/librtbuf/rtbuf_lib.c b/librtbuf/rtbuf_lib.c
index 9e56aa1..3f7ad1c 100644
--- a/librtbuf/rtbuf_lib.c
+++ b/librtbuf/rtbuf_lib.c
@@ -35,7 +35,7 @@ char *g_rtbuf_lib_path[] = { "./lib/",
RTBUF_LIBDIR "/",
0 };
-void rtbuf_lib_init_ ()
+void rtbuf_lib_init_ (void)
{
char *in = getenv("HOME");
char *out = g_rtbuf_lib_user_dir;
@@ -53,7 +53,7 @@ void rtbuf_lib_init_ ()
*out = 0;
}
-void rtbuf_lib_shutdown ()
+void rtbuf_lib_shutdown (void)
{
if (g_rtbuf_lib) {
rtbuf_lib_delete_all();
@@ -91,7 +91,7 @@ int rtbuf_lib_find (const char *str)
return -1;
}
-s_rtbuf_lib * rtbuf_lib_new ()
+s_rtbuf_lib * rtbuf_lib_new (void)
{
s_rtbuf_lib *lib = data_new(&g_rtbuf_lib_alloc);
return lib;
@@ -110,7 +110,7 @@ void rtbuf_lib_delete (s_rtbuf_lib *rl)
data_delete(&g_rtbuf_lib_alloc, rl);
}
-void rtbuf_lib_delete_all ()
+void rtbuf_lib_delete_all (void)
{
unsigned i = 0;
int n = g_rtbuf_lib_alloc.n;
diff --git a/librtbuf/rtbuf_proc.c b/librtbuf/rtbuf_proc.c
index fddc1c4..8e2990e 100644
--- a/librtbuf/rtbuf_proc.c
+++ b/librtbuf/rtbuf_proc.c
@@ -26,7 +26,7 @@ s_data_type g_rtbuf_proc_type = {
s_data_alloc g_rtbuf_proc_alloc;
s_rtbuf_proc *g_rtbuf_proc;
-void rtbuf_proc_init ()
+void rtbuf_proc_init (void)
{
data_alloc_init(&g_rtbuf_proc_alloc, &g_rtbuf_proc_type,
RTBUF_PROC_MAX, 0, 0);
@@ -34,7 +34,7 @@ void rtbuf_proc_init ()
assert(g_rtbuf_proc);
}
-void rtbuf_proc_shutdown ()
+void rtbuf_proc_shutdown (void)
{
if (g_rtbuf_proc) {
rtbuf_proc_delete_all();
@@ -48,7 +48,7 @@ int rtbuf_proc_p (s_rtbuf_proc *proc)
return proc && proc->name;
}
-s_rtbuf_proc * rtbuf_proc_new ()
+s_rtbuf_proc * rtbuf_proc_new (void)
{
s_rtbuf_proc *rf = data_new(&g_rtbuf_proc_alloc);
return rf;
@@ -60,7 +60,7 @@ void rtbuf_proc_delete (s_rtbuf_proc *proc)
data_delete(&g_rtbuf_proc_alloc, proc);
}
-void rtbuf_proc_delete_all ()
+void rtbuf_proc_delete_all (void)
{
unsigned i = 0;
int n = g_rtbuf_proc_alloc.n;
diff --git a/librtbuf/rtbuf_type.c b/librtbuf/rtbuf_type.c
index ab3f635..8abee1a 100644
--- a/librtbuf/rtbuf_type.c
+++ b/librtbuf/rtbuf_type.c
@@ -26,7 +26,7 @@ s_data_type g_rtbuf_data_type_type = {
s_data_alloc g_rtbuf_data_type_alloc;
s_rtbuf_type *g_rtbuf_data_type;
-void rtbuf_type_init ()
+void rtbuf_type_init (void)
{
data_alloc_init(&g_rtbuf_data_type_alloc, &g_rtbuf_data_type_type,
RTBUF_TYPE_MAX, 0, 0);
@@ -44,7 +44,7 @@ void rtbuf_type_init ()
rtbuf_type_define("double" , sizeof(double));
}
-void rtbuf_type_shutdown ()
+void rtbuf_type_shutdown (void)
{
if (g_rtbuf_data_type) {
rtbuf_type_delete_all();
@@ -70,7 +70,7 @@ void rtbuf_type_delete (s_rtbuf_type *rt)
data_delete(&g_rtbuf_data_type_alloc, rt);
}
-void rtbuf_type_delete_all ()
+void rtbuf_type_delete_all (void)
{
unsigned i = 0;
int n = g_rtbuf_data_type_alloc.n;
diff --git a/librtbuf/rtbuf_var.c b/librtbuf/rtbuf_var.c
index 126a196..404b283 100644
--- a/librtbuf/rtbuf_var.c
+++ b/librtbuf/rtbuf_var.c
@@ -53,11 +53,11 @@ void rtbuf_var_delete (s_rtbuf_var *var)
data_delete(&g_rtbuf_var_alloc, var);
}
-void rtbuf_var_delete_all ()
+void rtbuf_var_delete_all (void)
{
unsigned i = 0;
int n = g_rtbuf_var_alloc.n;
- while (i < g_rtbuf_var_alloc.max) {
+ while (i < g_rtbuf_var_alloc.max && n > 0) {
if (g_rtbuf_var[i].name) {
rtbuf_var_delete(g_rtbuf_var + i);
n--;
diff --git a/librtbuf/symbol.c b/librtbuf/symbol.c
index 34a79ba..153ab0b 100644
--- a/librtbuf/symbol.c
+++ b/librtbuf/symbol.c
@@ -45,7 +45,7 @@ void g_str_reset (char *head)
const char *g_symbols[SYMBOL_MAX];
unsigned int g_symbols_n = 0;
-void symbols_init () {
+void symbols_init (void) {
bzero(g_str_start, sizeof(g_str_start));
bzero(g_symbols, sizeof(g_symbols));
}
diff --git a/librtbuf/symbol.h b/librtbuf/symbol.h
index e302a6e..d032d24 100644
--- a/librtbuf/symbol.h
+++ b/librtbuf/symbol.h
@@ -31,7 +31,7 @@ void g_str_reset (char *head);
extern symbol g_symbols[SYMBOL_MAX];
extern unsigned int g_symbols_n;
-void symbols_init ();
+void symbols_init (void);
symbol symbol_new (symbol name);
void symbol_delete (symbol sym);
symbol symbol_find (symbol name);
diff --git a/librtbuf/type.h b/librtbuf/type.h
index 8e3a428..57d0993 100644
--- a/librtbuf/type.h
+++ b/librtbuf/type.h
@@ -25,12 +25,12 @@ struct rtbuf_type {
#define RTBUF_TYPE_MAX 1024
-void rtbuf_type_init ();
-void rtbuf_type_shutdown ();
+void rtbuf_type_init (void);
+void rtbuf_type_shutdown (void);
s_rtbuf_type * rtbuf_type_new (const char *name,
unsigned int size);
void rtbuf_type_delete (s_rtbuf_type *rt);
-void rtbuf_type_delete_all ();
+void rtbuf_type_delete_all (void);
s_rtbuf_type * rtbuf_type_find (symbol name);
s_rtbuf_type * rtbuf_type_define (const char *name,
unsigned int size);
diff --git a/librtbuf/var.h b/librtbuf/var.h
index a2bf8c4..2d7ab34 100644
--- a/librtbuf/var.h
+++ b/librtbuf/var.h
@@ -27,7 +27,7 @@ struct rtbuf_var {
void rtbuf_var_init (void);
void rtbuf_var_shutdown (void);
void rtbuf_var_delete (s_rtbuf_var *var);
-void rtbuf_var_delete_all ();
+void rtbuf_var_delete_all (void);
s_rtbuf_var * rtbuf_var_find (const char *name);
s_rtbuf_var * rtbuf_var_rtbuf_set (const char *name, unsigned i);
void rtbuf_var_print (const s_rtbuf_var *v);
diff --git a/test/synth b/test/synth
index c754747..48f7d36 100644
--- a/test/synth
+++ b/test/synth
@@ -4,8 +4,8 @@ let Keyboard00 = new glfw3/keyboard 100 100
load synth/adsr
let ADSR00 = new synth/adsr 300 300
-load signal/sinus
-let Osc00 = new signal/sinus 300 800
+load signal/square
+let Osc00 = new signal/square 300 800
load synth/synth
let Synth00 = new synth/synth 1000 100
@@ -14,10 +14,14 @@ bind Keyboard00 notes Synth00 notes
bind ADSR00 signal Synth00 envelope
bind Osc00 signal Synth00 oscillator
+load signal/flanger
+let Flanger00 = new signal/flanger 500 500
+
+bind Synth00 signal Flanger00 signal
+
load portaudio/output
let Output = new portaudio/output 1600 100
-bind Synth00 signal Output left
-bind Synth00 signal Output right
+bind Flanger00 signal Output left
start