summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/autoload.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2004-03-23 11:05:56 +0000
committerCorinna Vinschen <corinna@vinschen.de>2004-03-23 11:05:56 +0000
commit6653af6cc2d118f50dc8b7a37ba24d9bb9865ef6 (patch)
tree054ba40418ade238893f0fb06bba09fdb1cc96ff /winsup/cygwin/autoload.cc
parente437499bace8b40337198b96d62a742c0678ec57 (diff)
downloadcygnal-6653af6cc2d118f50dc8b7a37ba24d9bb9865ef6.tar.gz
cygnal-6653af6cc2d118f50dc8b7a37ba24d9bb9865ef6.tar.bz2
cygnal-6653af6cc2d118f50dc8b7a37ba24d9bb9865ef6.zip
* autoload.cc: Load eight more functions for waveIn support.
* fhandler.h (class fhandler_dev_dsp): Add class Audio, class Audio_in and class Audio_out members and audio_in_, audio_out_ pointers so that future changes are restricted to file fhandler_dsp.cc. * fhandler_dsp.cc (fhandler_dev_dsp::Audio): Add this class to treat things common to audio recording and playback. Add more format conversions. (fhandler_dev_dsp::Audio::queue): New queues for buffer management to fix incomplete cleanup of buffers passed to the wave device. (fhandler_dev_dsp::Audio_in): New, added class to implement audio recording. (fhandler_dev_dsp::Audio_out): Rework to use functionality provided by fhandler_dev_dsp::Audio. Allocate memory audio buffers late, just before write. (fhandler_dev_dsp::Audio_out::start): Size of wave buffer allocated here depends on audio rate/bits/channels. (fhandler_dev_dsp::Audio_in::start): Ditto. (fhandler_dev_dsp::setupwav): Replaced by following function. (fhandler_dev_dsp::Audio_out::parsewav): Does not setup wave device any more. Discard wave header properly. (fhandler_dev_dsp::open): Add O_RDONLY and_RDWR as legal modes. Protect against re-open. Activate fork_fixup. (fhandler_dev_dsp::ioctl): Protect against actions when audio is active. SNDCTL_DSP_GETFMTS only returns formats supported by mmsystem wave API, not all supported formats. SNDCTL_DSP_GETBLKSIZE result now depends on current audio format. (fhandler_dev_dsp::fixup_after_fork): Call fork_fixup for the Audio classes to let them duplicate the CRITICAL_SECTION.
Diffstat (limited to 'winsup/cygwin/autoload.cc')
-rw-r--r--winsup/cygwin/autoload.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index 9ed87af52..d64674c0a 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -530,6 +530,15 @@ LoadDLLfuncEx (timeGetTime, 0, winmm, 1)
LoadDLLfuncEx (timeBeginPeriod, 4, winmm, 1)
LoadDLLfuncEx (timeEndPeriod, 4, winmm, 1)
+LoadDLLfuncEx (waveInGetNumDevs, 0, winmm, 1)
+LoadDLLfuncEx (waveInOpen, 24, winmm, 1)
+LoadDLLfuncEx (waveInUnprepareHeader, 12, winmm, 1)
+LoadDLLfuncEx (waveInPrepareHeader, 12, winmm, 1)
+LoadDLLfuncEx (waveInAddBuffer, 12, winmm, 1)
+LoadDLLfuncEx (waveInStart, 4, winmm, 1)
+LoadDLLfuncEx (waveInReset, 4, winmm, 1)
+LoadDLLfuncEx (waveInClose, 4, winmm, 1)
+
LoadDLLfuncEx (UuidCreate, 4, rpcrt4, 1)
LoadDLLfuncEx (UuidCreateSequential, 4, rpcrt4, 1)
}