Add missing voids and *2 pool growth
This commit is contained in:
parent
3010d99592
commit
f95224db34
10
src/sfxd.c
10
src/sfxd.c
|
@ -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 execute_file(struct msg_target tgt, const char *path, int depth);
|
||||||
|
|
||||||
bool ipc_init(const char *sock_path);
|
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_clear(void);
|
||||||
void sfx_pool_grow(int size);
|
void sfx_pool_grow(int size);
|
||||||
|
@ -126,7 +126,7 @@ bool ipc_init(const char *sock_path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static char buffer_ipc_loop[BUFFER_SIZE];
|
static char buffer_ipc_loop[BUFFER_SIZE];
|
||||||
void ipc_loop() {
|
void ipc_loop(void) {
|
||||||
ssize_t data_len;
|
ssize_t data_len;
|
||||||
socklen_t sl_client = sizeof(ipc.sa_client);
|
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) {
|
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;
|
ma_result result;
|
||||||
SOFT_EXPECT((result = ma_engine_init(NULL, &audio.engine)), == MA_SUCCESS, false);
|
SOFT_EXPECT((result = ma_engine_init(NULL, &audio.engine)), == MA_SUCCESS, false);
|
||||||
return true;
|
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",
|
send_txt(tgt, "DBG: pool overflow: %d/%d (%.3f%%)\n",
|
||||||
sounds_pool.use, sounds_pool.cap,
|
sounds_pool.use, sounds_pool.cap,
|
||||||
100.0 * sounds_pool.use / (float)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);
|
send_txt(tgt, "Loading audio key=%s from %s\n", key, path);
|
||||||
|
|
Loading…
Reference in New Issue