Using Win32 functions in Visual FoxPro Image Gallery
Windows Multimedia
..msdn
AVIFileExit
AVIFileGetStream
AVIFileInfo
AVIFileInit
AVIFileOpen
AVIFileRelease
AVIFileWriteData
AVIStreamGetFrame
AVIStreamGetFrameClose
AVIStreamGetFrameOpen
AVIStreamInfo
AVIStreamLength
AVIStreamReadFormat
AVIStreamRelease
AVIStreamStart
AVIStreamTimeToSample
capCreateCaptureWindow
capGetDriverDescription
DrawDibClose
DrawDibDraw
DrawDibOpen
mciGetDeviceID
mciGetErrorString
mciSendCommand
mciSendString
midiOutClose
midiOutGetDevCaps
midiOutGetNumDevs
midiOutOpen
midiOutReset
midiOutShortMsg
mixerClose
mixerGetControlDetails
mixerGetDevCaps
mixerGetID
mixerGetLineControls
mixerGetLineInfo
mixerGetNumDevs
mixerOpen
mixerSetControlDetails
mmioAscend
mmioClose
mmioCreateChunk
mmioDescend
mmioFlush
mmioOpen
mmioRead
mmioSeek
mmioWrite
PlaySound
sndPlaySound
timeGetDevCaps
waveInAddBuffer
waveInClose
waveInGetDevCaps
waveInGetErrorText
waveInGetNumDevs
waveInGetPosition
waveInOpen
waveInPrepareHeader
waveInReset
waveInStart
waveInStop
waveInUnprepareHeader
waveOutClose
waveOutGetDevCaps
waveOutGetErrorText
waveOutGetNumDevs
waveOutGetPosition
waveOutGetVolume
waveOutOpen
waveOutPrepareHeader
waveOutReset
waveOutSetVolume
waveOutUnprepareHeader
waveOutWrite
Code examples:
How to play a waveform sound (a WAV file in particular)
WAV file recorder
How to play a waveform sound (a WAV file in particular)

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Versions:
click to open
Before you begin:
This is a simple way of playing WAV files, and other waveform sounds from the Windows Registry, or from a memory image of a wavefrom sound.

See also:

  • WAV file player
  • WAV file recorder
  • Playing WAV sounds simultaneously
  • How to play MIDI notes
  •  
    #DEFINE SND_SYNC 0
    #DEFINE SND_ASYNC 1
    #DEFINE SND_NODEFAULT 2
    #DEFINE SND_MEMORY 4
    #DEFINE SND_LOOP 8
    #DEFINE SND_NOSTOP 16
     
    DECLARE INTEGER sndPlaySound IN winmm;
        STRING lpszSound, INTEGER fuSound
     
    = sndPlaySound("c:\windows\media\tada.wav",;
        SND_ASYNC + SND_NODEFAULT)
     
    *!*    = sndPlaySound("c:\windows\media\chimes.wav",;
    *!*        SND_SYNC + SND_NODEFAULT)
     
    *!*    = sndPlaySound("c:\windows\media\chord.wav",;
    *!*        SND_SYNC + SND_NODEFAULT)
     
    *!*    = sndPlaySound("c:\windows\media\notify.wav",;
    *!*        SND_SYNC + SND_NODEFAULT + SND_NOSTOP)
     
    *!*    = sndPlaySound("c:\program files\icq\icqgreet.wav",;
    *!*        SND_ASYNC)
     
     

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    633 bytes  
    Created: 2002-01-14 19:56:34  
    Modified: 2008-04-10 08:01:04  
    Visits in 7 days: 58  
    Listed functions:
    sndPlaySound
    Printer friendly API declarations
    My comment:
    Different combinations of flags provide some interesting ways, such as playing sounds asynchronously, when the sndPlaySound returns immediately after starting playing the sound. Still note that this function cannot be used for playing multiple sounds simultaneously. The waveOut* functions do that.
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian  
    FreeTranslation.com offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.


    Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

    Privacy policy
    Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (50.16.17.90)
    3.93 hrs.Example: 'How to convert a bitmap file to monochrome format (1 bpp)'
    5.77 hrs.Function: 'ZeroMemory'
    7.74 hrs.Function: 'GetTextFace'
    Function group: 'Font and Text'
     Example: 'Converting twips to pixels and vice versa'
    8.79 hrs.Function: 'ImageList_GetImageInfo'
    Function group: 'Windows Controls'
     Example: 'Creating a folder'
    9.93 hrs.Function: 'SQLManageDataSources'
     Example: 'Retrieving the name of the network resource associated with a local device'
    12.55 hrs.Example: 'Displaying bitmap using the AlphaBlend function'
    12.56 hrs.Function: 'CreateService'
    Function group: 'Service'
    Google
    Advertise here!