pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/seamonkey seamonkey: Disable non-blocking i/o in s...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7f30bd8bb5c5
branches: trunk
changeset: 396980:7f30bd8bb5c5
user: nia <nia%pkgsrc.org@localhost>
date: Thu Jun 13 23:08:05 2019 +0000
description:
seamonkey: Disable non-blocking i/o in sun audio backend, follows firefox60
diffstat:
www/seamonkey/Makefile | 4 ++--
www/seamonkey/files/cubeb_sun.c | 31 ++++---------------------------
2 files changed, 6 insertions(+), 29 deletions(-)
diffs (97 lines):
diff -r ab428883ec2a -r 7f30bd8bb5c5 www/seamonkey/Makefile
--- a/www/seamonkey/Makefile Thu Jun 13 22:20:39 2019 +0000
+++ b/www/seamonkey/Makefile Thu Jun 13 23:08:05 2019 +0000
@@ -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 -r ab428883ec2a -r 7f30bd8bb5c5 www/seamonkey/files/cubeb_sun.c
--- a/www/seamonkey/files/cubeb_sun.c Thu Jun 13 22:20:39 2019 +0000
+++ b/www/seamonkey/files/cubeb_sun.c Thu Jun 13 23:08:05 2019 +0000
@@ -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 @@
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 @@
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 @@
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 @@
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 @@
}
#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 @@
info.play.channels);
return CUBEB_OK;
#else
- cubeb_params params;
+ cubeb_stream_params params;
params.rate = stream->p_info.play.sample_rate;
Home |
Main Index |
Thread Index |
Old Index