Silverfrost Logo About Us | Contact Us
 

PLAY_SOUND_RESOURCE@

Platform

Win32(ClearWin+)

Purpose

To send a resource SOUND to the current audio device.

Syntax

INTEGER FUNCTION PLAY_SOUND_RESOURCE@( NAME )
CHARACTER*80 NAME

Description

This routine plays any resource that is of type SOUND. Care should be taken not to include samples (.WAV files) that are more than a few seconds for two reasons. 1) the sample occupies memory and 2) the routine is synchronous and will halt all other output until the sample has completed playback. It is necessary to supply a valid resource name to this routine.

For example:

Include in the resource section of your program:

MYWAVE    SOUND      "dogbark.wav"

In the code section:

res=PLAY_SOUND_RESOURCE@( 'MYWAVE' )

Return value

Returns 0 for success, otherwise -1.

See also

WRITE_WAV_FILE@, PLAY_SOUND@, RECORD_SOUND@, SOUND_PLAYING@,
SOUND_RECORDING@

 

 

Copyright © 1999-2017 Silverfrost Limited