summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-06-13 23:08:05 +0000
committernia <nia@pkgsrc.org>2019-06-13 23:08:05 +0000
commit4cba634eaa62b47bc3f88c1aff7eff623e7e8a7f (patch)
treefc04df7294d48bbdad1587200debbfd4b0fea67c /www
parent7a3dc2b609ed7a6e17657c60c486d44b24585ff1 (diff)
downloadpkgsrc-4cba634eaa62b47bc3f88c1aff7eff623e7e8a7f.tar.gz
seamonkey: Disable non-blocking i/o in sun audio backend, follows firefox60
Diffstat (limited to 'www')
-rw-r--r--www/seamonkey/Makefile4
-rw-r--r--www/seamonkey/files/cubeb_sun.c31
2 files changed, 6 insertions, 29 deletions
diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile
index 7ee77073019..09a51104484 100644
--- a/www/seamonkey/Makefile
+++ b/www/seamonkey/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.192 2019/06/13 10:53:11 nia Exp $
+# $NetBSD: Makefile,v 1.193 2019/06/13 23:08:05 nia Exp $
DISTNAME= seamonkey-${SM_VER}.source
PKGNAME= seamonkey-${SM_VER:S/b/beta/}
-PKGREVISION= 10
+PKGREVISION= 11
SM_VER= 2.49.4
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA:=seamonkey/releases/${SM_VER}/source/}
diff --git a/www/seamonkey/files/cubeb_sun.c b/www/seamonkey/files/cubeb_sun.c
index 2558fe99d2d..37c43a607b4 100644
--- a/www/seamonkey/files/cubeb_sun.c
+++ b/www/seamonkey/files/cubeb_sun.c
@@ -8,7 +8,6 @@
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
-#include <poll.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
@@ -440,7 +439,6 @@ sun_io_routine(void * arg)
long to_write = 0;
size_t write_ofs = 0;
size_t read_ofs = 0;
- struct pollfd pfds[1];
int drain = 0;
s->state_cb(s, s->user_ptr, CUBEB_STATE_STARTED);
@@ -485,15 +483,7 @@ sun_io_routine(void * arg)
if (to_write < SUN_BUFFER_FRAMES) {
drain = 1;
}
- pfds[0].fd = s->play_fd;
- if (s->play_fd != -1) {
- if (to_write > 0) {
- pfds[0].events = POLLOUT;
- }
- } else {
- pfds[0].events = 0;
- to_write = 0;
- }
+ to_write = s->play_fd != -1 ? to_write : 0;
to_read = s->record_fd != -1 ? SUN_BUFFER_FRAMES : 0;
write_ofs = 0;
read_ofs = 0;
@@ -501,17 +491,7 @@ sun_io_routine(void * arg)
size_t bytes;
ssize_t n, frames;
- if (pfds[0].events != 0 && poll(pfds, 1, SUN_POLL_TIMEOUT) == -1) {
- LOG("poll failed");
- state = CUBEB_STATE_ERROR;
- break;
- }
- if ((pfds[0].revents & POLLHUP) || (pfds[0].revents & POLLERR)) {
- LOG("audio device disconnected");
- state = CUBEB_STATE_ERROR;
- break;
- }
- if (to_write > 0 && (pfds[0].revents & POLLOUT)) {
+ if (to_write > 0) {
bytes = FRAMES_TO_BYTES(to_write, s->p_info.play.channels);
if ((n = write(s->play_fd, s->play_buf + write_ofs, bytes)) < 0) {
state = CUBEB_STATE_ERROR;
@@ -523,9 +503,6 @@ sun_io_routine(void * arg)
pthread_mutex_unlock(&s->mutex);
to_write -= frames;
write_ofs += frames;
- if (to_write == 0) {
- pfds[0].events = 0;
- }
}
if (to_read > 0) {
bytes = FRAMES_TO_BYTES(to_read, s->r_info.record.channels);
@@ -617,7 +594,7 @@ sun_stream_init(cubeb * context,
}
#endif
if (s->play_fd == -1) {
- if ((s->play_fd = open(s->output_name, O_WRONLY | O_NONBLOCK)) == -1) {
+ if ((s->play_fd = open(s->output_name, O_WRONLY)) == -1) {
LOG("Audio device cannot be opened as write-only");
ret = CUBEB_ERROR_DEVICE_UNAVAILABLE;
goto error;
@@ -707,7 +684,7 @@ sun_stream_get_latency(cubeb_stream * stream, uint32_t * latency)
info.play.channels);
return CUBEB_OK;
#else
- cubeb_params params;
+ cubeb_stream_params params;
params.rate = stream->p_info.play.sample_rate;