Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: sound.c Log Message: Fix warnings whithout HAVE_LIBESD. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/sound.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- sound.c 30 Dec 2004 07:41:28 -0000 1.27 +++ sound.c 2 Jan 2005 09:45:35 -0000 1.28 @@ -62,10 +62,10 @@ static int sound_fd = -1; +#ifdef HAVE_LIBESD static Sample * LoadWav(const char *file) { -#ifdef HAVE_LIBESD AFfilehandle in_file; char *find = NULL; Sample *s; @@ -73,10 +73,8 @@ int bytes_per_frame, frames_read; double in_rate; -#endif - EDBUG(5, "LoadWav"); -#ifdef HAVE_LIBESD + find = FindFile(file, Mode.theme.path); if (!find) { @@ -135,22 +133,17 @@ frames_read = afReadFrames(in_file, AF_DEFAULT_TRACK, s->data, frame_count); afCloseFile(in_file); Efree(find); + EDBUG_RETURN(s); -#else - file = NULL; - EDBUG_RETURN(NULL); -#endif } static void SamplePlay(Sample * s) { -#ifdef HAVE_LIBESD int size, confirm = 0; -#endif EDBUG(5, "SamplePlay"); -#ifdef HAVE_LIBESD + if ((sound_fd < 0) || (!Conf_sound.enable) || (!s)) EDBUG_RETURN_; @@ -172,11 +165,10 @@ } if (s->id > 0) esd_sample_play(sound_fd, s->id); -#else - s = NULL; -#endif + EDBUG_RETURN_; } +#endif /* HAVE_LIBESD */ static void DestroySample(Sample * s) ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs