Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!ucbcad!ucbvax!jade!eris!mwm From: mwm@eris.BERKELEY.EDU (Mike (My watch has windows) Meyer) Newsgroups: comp.sys.amiga Subject: Audio device problems Message-ID: <5600@jade.BERKELEY.EDU> Date: Fri, 23-Oct-87 07:34:07 EST Article-I.D.: jade.5600 Posted: Fri Oct 23 07:34:07 1987 Date-Received: Sun, 25-Oct-87 15:13:12 EST Sender: usenet@jade.BERKELEY.EDU Reply-To: mwm@eris.BERKELEY.EDU (Mike (My watch has windows) Meyer) Organization: Missionaria Phonibalonica Lines: 37 I've got a program that needs two simple sounds. One can run sync, but the other wants to be async. I allocate a port, an IOAudio struct and let OpenDevice allocate a channel for me. I then have a pair of routines that issue the do a CMD_WRITE with the appropriate waveform. The sync sounds just then does a WaitIO on the IOAudio request. The async versions returns after the BeginIO, and a third function is called later to do the WaitIO. Everything work as expected (and is working in the background, even as I type this). Except every once in a while, the thing hangs. Apparently in the WaitIO for the async sound (the sequence is: async sound, a little cleanup, sync sound). Everything worked fine before I added the sound code, so that's presumable the problem. Changing the async code to run sync (start function does it all, third function a nop) doesn't help. Things seem to be working just fine now. But the async WaitIO has been replaced by a loop: while (GetMsg(audio_port) != NULL) ; Ugly. Not right. Anyone got a fix? Oh yeah - nothing else that would want to touch the audio is running. Thanx,