Add missing voids and *2 pool growth

This commit is contained in:
Casey 2024-02-25 01:11:03 +03:00
parent 3010d99592
commit f95224db34
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
1 changed files with 5 additions and 5 deletions

View File

@ -52,9 +52,9 @@ void execute_command(struct msg_target tgt, const char *command, const char *par
bool execute_file(struct msg_target tgt, const char *path, int depth);
bool ipc_init(const char *sock_path);
void ipc_loop();
void ipc_loop(void);
bool audio_init();
bool audio_init(void);
void sfx_pool_clear(void);
void sfx_pool_grow(int size);
@ -126,7 +126,7 @@ bool ipc_init(const char *sock_path) {
}
static char buffer_ipc_loop[BUFFER_SIZE];
void ipc_loop() {
void ipc_loop(void) {
ssize_t data_len;
socklen_t sl_client = sizeof(ipc.sa_client);
while ((data_len = recvfrom(ipc.sock_fd, buffer_ipc_loop, sizeof(buffer_ipc_loop) - 1, 0, (struct sockaddr *)&ipc.sa_client, &sl_client)) != -1) {
@ -145,7 +145,7 @@ void ipc_loop() {
}
}
bool audio_init() {
bool audio_init(void) {
ma_result result;
SOFT_EXPECT((result = ma_engine_init(NULL, &audio.engine)), == MA_SUCCESS, false);
return true;
@ -190,7 +190,7 @@ void execute_command(struct msg_target tgt, const char *command, const char *par
send_txt(tgt, "DBG: pool overflow: %d/%d (%.3f%%)\n",
sounds_pool.use, sounds_pool.cap,
100.0 * sounds_pool.use / (float)sounds_pool.cap);
sfx_pool_grow((int)(sounds_pool.cap * 1.5));
sfx_pool_grow(sounds_pool.cap * 2);
}
send_txt(tgt, "Loading audio key=%s from %s\n", key, path);