1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 19:16:45 +02:00

Add hardcoded path for sound notifications

This commit is contained in:
Ansa89
2014-07-23 11:25:38 +02:00
parent 50fca4cddf
commit 3cc629cbc1
3 changed files with 55 additions and 25 deletions

View File

@ -29,6 +29,7 @@
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include <sys/stat.h>
#ifdef __APPLE__
#include <OpenAL/al.h>
@ -232,13 +233,16 @@ void terminate_notify()
}
#ifdef _SOUND_NOTIFY
void set_sound(Notification sound, const char* value)
int set_sound(Notification sound, const char* value)
{
free(Control.sounds[sound]);
size_t len = strlen(value) + 1;
Control.sounds[sound] = calloc(1, len);
memcpy(Control.sounds[sound], value, len);
struct stat buf;
return stat(value, &buf) == 0;
}
int play_sound_internal(Notification what, _Bool loop)