Mercurial > audlegacy
comparison Plugins/Output/OSS/audio.c @ 733:3c2bb116f4db trunk
[svn] - remerge fixed version of OSS patch. Submitted by Bren <spike -at- spykes.net>
author | nenolod |
---|---|
date | Mon, 27 Feb 2006 15:43:15 -0800 |
parents | 9783edaae2b5 |
children | f12d7e208b43 |
comparison
equal
deleted
inserted
replaced
732:d77a1c5b5c13 | 733:3c2bb116f4db |
---|---|
250 } | 250 } |
251 | 251 |
252 static inline ssize_t | 252 static inline ssize_t |
253 write_all(int fd, const void *buf, size_t count) | 253 write_all(int fd, const void *buf, size_t count) |
254 { | 254 { |
255 ssize_t done = 0; | 255 size_t done = 0; |
256 do { | 256 do { |
257 ssize_t n = write(fd, (gchar *) buf + done, count - done); | 257 ssize_t n = write(fd, (gchar *) buf + done, count - done); |
258 if (n == -1) { | 258 if (n == -1) { |
259 if (errno == EINTR) | 259 if (errno == EINTR) |
260 continue; | 260 continue; |
421 static gint | 421 static gint |
422 oss_downsample(gpointer ob, guint length, guint speed, guint espeed) | 422 oss_downsample(gpointer ob, guint length, guint speed, guint espeed) |
423 { | 423 { |
424 guint w = 0; | 424 guint w = 0; |
425 static gpointer nbuffer = NULL; | 425 static gpointer nbuffer = NULL; |
426 static gint nbuffer_size = 0; | 426 static guint nbuffer_size = 0; |
427 | 427 |
428 switch (output.format.oss) { | 428 switch (output.format.oss) { |
429 case AFMT_S16_BE: | 429 case AFMT_S16_BE: |
430 case AFMT_S16_LE: | 430 case AFMT_S16_LE: |
431 if (output.channels == 2) | 431 if (output.channels == 2) |