Displaying 4 results from an estimated 4 matches for "buf_t".
Did you mean:
buf_
2001 Mar 17
1
ogg123: shared memory by mmap()
...#include <sys/shm.h>
+#endif
#include <sys/time.h>
#include <unistd.h> /* for fork and pipe*/
#include <fcntl.h>
-#ifndef DARWIN
-#include <malloc.h>
-#endif
-
#include "ogg123.h"
#include "buffer.h"
@@ -72,6 +72,22 @@
int childpid;
buf_t *buf;
+#if HAVE_SMMAP
+ int fd;
+
+ if ((fd = open("/dev/zero", O_RDWR)) < 0)
+ {
+ perror ("cannot open /dev/zero");
+ exit (1);
+ }
+ if ((buf = (buf_t *) mmap (0, sizeof(buf_t) + sizeof (chunk_t) * (size - 1),
+ PROT_READ|PR...
2002 Oct 05
2
ogg123 remote interface
...ory.\n"));
diff -urN -X diff.ignore ogg123.orig/ogg123.c ogg123/ogg123.c
--- ogg123.orig/ogg123.c Sat Jul 6 21:12:18 2002
+++ ogg123/ogg123.c Sat Oct 5 14:22:06 2002
@@ -48,19 +48,12 @@
void exit_cleanup ();
-void play (char *source_string);
+void play (audio_play_arg_t *audio_play_arg, buf_t *audio_buffer, char *source_string);
-/* take buffer out of the data segment, not the stack */
-#define AUDIO_CHUNK_SIZE 4096
unsigned char convbuffer[AUDIO_CHUNK_SIZE];
int convsize = AUDIO_CHUNK_SIZE;
-
ogg123_options_t options;
-stat_format_t *stat_format;
-buf_t *audio_buffer;
-
-audio_pla...
2001 Mar 17
1
ogg123 doesn't destroy shm segment
...ipc.h>
#include <sys/shm.h>
-#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h> /* for fork and pipe*/
#include <fcntl.h>
@@ -76,7 +75,7 @@
/* Get the shared memory segment. */
int shmid = shmget (IPC_PRIVATE,
sizeof(buf_t) + sizeof (chunk_t) * (size - 1),
- IPC_CREAT|S_IREAD|S_IWRITE);
+ IPC_CREAT|SHM_R|SHM_W);
if (shmid == -1)
{
@@ -92,7 +91,10 @@
perror ("shmat");
exit (1);
}
-
+
+ /* Remove segment after last process detaches it or terminates. */
+ shmctl(shmid,...
2004 May 23
4
Various Ogg Vorbis largefile notes and/or patches
Greetings one and all;
I'm not subscribed to this list so I'm first sending this message
to verify that mails from me make it through, and then later I'll
send the juicy messages with patches. Also, the address I'm using
is IPv6-only and doesn't often work, so drop me from any replies
and I'll catch the archives, or drop only the hostname part to get
an IPv4 address that