[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Class TVocFile
It provides VocFile Objects to automatically manage Sound Blaster's VOC files
--------------------------------------------------------------------------------
Description
Welcome to multimedia sound revolution for Clipper!
Are you ready for playing the best quality sounds from your Clipper
programs ? Now, with the power of Clipper's Object Oriented technology and
SoundBlaster's state of the art sounding board you can easily start enjoying
multimedia sounds.
VOC files are used by Sound Blaster to store high quality sounds, voices,
music, etc... You can also use WAV2VOC.EXE, an utility provided in the
software of Sound Blaster -SB- to convert Windows WAV files into VOC files,
so you should use any of the thousands of files available for Windows. Or
you can use a microphone to record your own new sounds, mixing music and
voice, recording real world sounds... the limit is just your imagination!
Managing VOC files is as easy as creating a VocFile Object:
local oVoc := TVocFile():Use( "hello.voc" )
At the same time we have created it, we have send it the Use() message to
correctly initialize the VocFile Object. That is why we say this Use()
method is a constructor method.
Now, to play it, we send it a Play message:
oVoc:Play()
Before or after playing it you can inspect all the Object's data,
even with the Clipper debugger to easily modify the configuration of your
SB card. A VocFile Object 'knows' if the SB hardware is available, the
volume level, the name of the file -no matter its size-, ...
You can change Object Data nDelay to modify the speed of sound playing,
oVoc:nDelay = 11
oVoc:Play()
You should use as many Voc Files at the same time as you want, playing
them one after another, or playing the same VOC file as many times as
you need.
If you want to create your own VOC files is as easy as sendind the
message Rec() and the VocFile will start recording the sound and creating
the VOC file on disk. Caution: Rec() method will destroy any previously
VOC file created with the same name!
local oVoc := TVocFile():Use( "NoPrinter.voc" )
if oVoc:lHardware
Alert( "Start recording now! Press a key to stop..." )
oVoc:Rec()
endif
oVoc:Play() // let's listen it!
oVoc:Use() // we have finished using that VOC file
Enjoy!
Class TVocFile ver. 1.0
(c) Antonio Linares, 1993
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson