c guru (bit off topic)
mbartkow at ET.PUT.Poznan.PL
mbartkow at ET.PUT.Poznan.PL
Tue Sep 21 15:33:14 CEST 1999
Martin,
> 1. I'm looking for a way to transfer files rapidly into dram.
> There must be some kind of block-transfer stuff, but how
> is this encoded in the librarys? fscanf is slow.
fread and read do the trick, whereby the first one is buffered
and the second is not.
NAME
read, pread, readv - read from file
SYNOPSIS
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
ssize_t read(int fildes, void *buf, size_t nbyte);
ssize_t pread(int fildes, void *buf, size_t nbyte,
off_t offset);
ssize_t readv(int fildes, struct iovec *iov, int iovcnt);
MT-LEVEL
read() is Async-Signal-Safe
DESCRIPTION
read() attempts to read nbyte bytes from the file associated
with fildes into the buffer pointed to by buf. If nbyte is
zero, read() returns zero and has no other results. fildes
is an open file descriptor.
...
> 2. Does anyone have a (preferable gnu-c) piece of code,
> that dumps memory into a sound card (soundblaster)?
> That way I wouldn't need to read the result file
> into Cool-Edit or something each time a computation
> is done.
It heavily depends on the operating system. Usually, in protected
mode you are not allowed to talk to your hardware directly and it
is necessary to use the API functions which are an universal interface
to the drivers of the soundcard actually installed in your system.
If you use CoolEdit, there is a SDK available at their site and
you are able to develop an elegant plugin for CE using their comfortable
API. You will be forced to use M$ Visual C/C++, though, instead of Gnu C.
regards,
MB
--
Maciej Bartkowiak, PhD
========================================================================
Institute of Electronics and Telecommunication fax: (+48 61) 8782572
Poznan University of Technology phone: (+48 61) 8791016 int.171
Piotrowo 3A email: mbartkow at et.put.poznan.pl
60-965 Poznan POLAND http://www.et.put.poznan.pl/~mbartkow
========================================================================
More information about the Synth-diy
mailing list