Mercurial > pidgin
changeset 354:2b91e42bff70
[gaim-migrate @ 364]
People should stop getting errors because of sound now.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 07 Jun 2000 23:59:43 +0000 |
parents | a4df8f1cc61a |
children | 29c94613ee63 |
files | ChangeLog TODO src/sound.c |
diffstat | 3 files changed, 14 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jun 07 22:32:44 2000 +0000 +++ b/ChangeLog Wed Jun 07 23:59:43 2000 +0000 @@ -8,6 +8,7 @@ * Compile-time options affect Preferences dialog * Whispering works (does anyone even use this?) * HTML-tag buttons in chat + * Locale support version 0.9.18 (06/02/2000): * Logging in works better for oscar
--- a/TODO Wed Jun 07 22:32:44 2000 +0000 +++ b/TODO Wed Jun 07 23:59:43 2000 +0000 @@ -1,6 +1,5 @@ --- STUFF FOR 0.9.19 RELEASE --- Gaim 95? KDE Awareness? - Locale Support Make Buddy Chat Prettier Icons for buddy list (I forget what this was)
--- a/src/sound.c Wed Jun 07 22:32:44 2000 +0000 +++ b/src/sound.c Wed Jun 07 23:59:43 2000 +0000 @@ -111,28 +111,21 @@ } +int esd_fd; static int play_esd(unsigned char *data, int size) { - int fd, i; - esd_format_t format = ESD_BITS16 | ESD_STREAM | ESD_PLAY | ESD_MONO; + int i; guint16 *lineardata; - - fd = esd_play_stream_fallback(format, 8012, NULL, "gaim"); - - if (fd < 0) { - return 0; - } - lineardata = g_malloc(size * 2); for (i=0; i<size; i++) lineardata[i] = _af_ulaw2linear(data[i]); - write(fd, lineardata, size * 2); + write(esd_fd, lineardata, size * 2); - close(fd); + close(esd_fd); g_free(lineardata); return 1; @@ -141,7 +134,15 @@ static int can_play_esd() { - return 1; + esd_format_t format = ESD_BITS16 | ESD_STREAM | ESD_PLAY | ESD_MONO; + + esd_fd = esd_play_stream(format, 8012, NULL, "gaim"); + + if (esd_fd < 0) { + return 0; + } + + return 1; } #endif