PRB: FoxPro Hangs After Playing .WAV File

ID: Q95673

The information in this article applies to:

Summary:

SYMPTOMS

FoxPro version 2.5 for Windows appears to hang after playing a .WAV

   file on a computer that has the Microsoft Windows Sound System
   installed.

CAUSE

The Microsoft Sound System installs Quick Recorder as the object

   linking and embedding (OLE) server for .WAV files instead of Sound
   Recorder, the default. Unlike Sound Recorder, Quick Recorder
   remains open as an icon after playing the .WAV file. FoxPro, by
   default, will wait for the OLE server to finish playing the sound
   and return control to FoxPro before continuing execution.

RESOLUTION

Use the NOWAIT clause on the @...SAY command. The NOWAIT clause

   will send a message to Quick Recorder to play the specified sound
   and immediately continue program execution within FoxPro without
   waiting for Quick Recorder to finish. The following is an example
   of the use of the @...SAY command with the NOWAIT clause:

      @ 1,1 SAY object VERB "PLAY" NOWAIT

   This plays the sound stored in the "object" field and continues
   program execution within FoxPro without waiting for the sound to
   finish playing.

Additional reference words: FoxWin 2.50 QRecord hangs OLE wss KBCategory: kbprg kbprb KBSubcategory: FxinteropOle

Last Reviewed: June 26, 1995