diff options
author | sobomax <sobomax@FreeBSD.org> | 2000-05-24 16:26:15 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2000-05-24 16:26:15 +0800 |
commit | bb336af9f3b435b32465b0c665b26a7538f68ba7 (patch) | |
tree | 89d13be3102829fc62a37a0e8d4dcfe46bf69f29 /audio/wsoundserver | |
parent | 2bc65ef2103776e46110c31051ce24bc298e264b (diff) | |
download | freebsd-ports-gnome-bb336af9f3b435b32465b0c665b26a7538f68ba7.tar.gz freebsd-ports-gnome-bb336af9f3b435b32465b0c665b26a7538f68ba7.tar.zst freebsd-ports-gnome-bb336af9f3b435b32465b0c665b26a7538f68ba7.zip |
Provide a small workarround to fix a bug in the pcm driver. The driver seems
need at least two write() calls for sound to be actually played.
I have notified Cameron Grant <cg@FreeBSD.org> about the issue.
Diffstat (limited to 'audio/wsoundserver')
-rw-r--r-- | audio/wsoundserver/files/patch-ae | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/audio/wsoundserver/files/patch-ae b/audio/wsoundserver/files/patch-ae new file mode 100644 index 000000000000..8fbf4667cc7e --- /dev/null +++ b/audio/wsoundserver/files/patch-ae @@ -0,0 +1,44 @@ +--- wslib/audio_voxware.c.orig Fri Mar 31 23:14:40 2000 ++++ wslib/audio_voxware.c Wed May 24 11:08:24 2000 +@@ -403,6 +403,7 @@ + long blkFrames; /* number of frames in current audio block */ + int blockSize = 8192; /* Size of an audio block buffer in frames */ + int i; ++ u_int8_t fakebuffer[2] = {0, 0}; + + #ifdef DEBUG + fprintf(stderr, " >> writing data\n"); +@@ -413,7 +414,11 @@ + SErrorCode = SERR_NOMEMORY; + return -1; + } +- ++ ++ /* Following line is a simple workarround for buggy pcm driver, which seens need at least to write() ++ calls for sound to be actually played */ ++ write(audiofd, fakebuffer, 2); ++ + curFrame = 0; + while (curFrame < afInfo->FrameCount) { + if ((blkFrames = (afInfo->FrameCount - curFrame)) > blockSize) { +@@ -503,6 +508,7 @@ + long blkFrames; /* number of frames in current audio block */ + int blockSize = 4096; /* Size of an audio block buffer in frames */ + int i; ++ u_int16_t fakebuffer[2] = {0, 0}; + + #ifdef DEBUG + fprintf(stderr, " >> writing data\n"); +@@ -513,7 +519,11 @@ + SErrorCode = SERR_NOMEMORY; + return -1; + } +- ++ ++ /* Following line is a simple workarround for buggy pcm driver, which seens need at least to write() ++ calls for sound to be actually played */ ++ write(audiofd, fakebuffer, 4); ++ + curFrame = 0; + while (curFrame < afInfo->FrameCount) { + if ((blkFrames = (afInfo->FrameCount - curFrame)) > blockSize) { |