diff options
author | Christopher Faylor <me@cgf.cx> | 2001-04-16 03:27:16 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-04-16 03:27:16 +0000 |
commit | b0a50cf34c1646ca943983d7a34c57360ce062c1 (patch) | |
tree | a8f3a9042adc69c81af40cc88548e288c02d5b8f /winsup/cygwin/fhandler.h | |
parent | 9f42525632f6edb1ff93fba5a724b927dd983a19 (diff) | |
download | cygnal-b0a50cf34c1646ca943983d7a34c57360ce062c1.tar.gz cygnal-b0a50cf34c1646ca943983d7a34c57360ce062c1.tar.bz2 cygnal-b0a50cf34c1646ca943983d7a34c57360ce062c1.zip |
* autoload.cc: Add winmm functions needed by fhandler_dsp.cc.
* fhandler_dsp.cc: New file. Implements OSS like /dev/dsp.
* include/sys/soundcard.h: New file. User land includes for OSS /dev/dsp.
* fhandler.h: Add new class fhandler_dev_dsp and a FH_OSS_DSP definition.
* dtable.cc (dtable::build_fhandler): Allow creation of the /dev/dsp device.
* path.cc (windows_device_names): Add /dev/dsp into list of device names.
* Makefile.in (DLL_OFILES): Add fhandler_dsp.o.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 32ccacc75..f99b0938e 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -88,7 +88,7 @@ enum FH_PIPEW = 0x0000000a, /* write end of a pipe */ FH_SOCKET = 0x0000000b, /* is a socket */ FH_WINDOWS = 0x0000000c, /* is a window */ - + FH_OSS_DSP = 0x0000000d, /* is the dsp audio device */ FH_SLOW = 0x00000010, /* "slow" device if below this */ /* Fast devices */ @@ -941,6 +941,29 @@ public: int ready_for_read (int fd, DWORD howlong, int ignra); }; +class fhandler_dev_dsp : public fhandler_base +{ +private: + int audioformat_; + int audiofreq_; + int audiobits_; + int audiochannels_; + bool setupwav(const char *pData, int nBytes); + +public: + fhandler_dev_dsp (const char *name = 0); + ~fhandler_dev_dsp(); + + int open (const char *path, int flags, mode_t mode = 0); + int write (const void *ptr, size_t len); + int read (void *ptr, size_t len); + int ioctl (unsigned int cmd, void *); + off_t lseek (off_t, int); + int close (void); + int dup (fhandler_base * child); + void dump (void); +}; + #if 0 /* You can't do this */ typedef union |