Bay City, Michigan
Sales (989) 892-9242             Support (989) 686-8860
SOUND FILESThis is a PRELIMINARY discussion.
Just a reminder that PL/B can play WAV files.Sound_File SNDFILE SNDOPEN Sound_File,"MyWay.WAV" SNDPLAY Sound_File SNDCLOSE Sound_File
NOTESFrom the Sunbelt Web board 4/5/2004 from PaulFuh of New York:
"How about using resource ID and Media Control Interface functions? "
Answer from Ed Boedecker:1. The MCI keyword specified in the SNDOPEN instruction simply causes the Microsoft Media Control Interface functions to be used when playing the sound wave file. This does not provide any more functionality for a user program. The user program still uses SNDOPEN, SNDPLAY, and SNDCLOSE to play a wave sound file.End of Ed's answer. A response from Paul was:
2. Note (5.) in the Language Reference Manual identifies that the '@" is used with a form resource name. This note does not say resource ID. When resources are added to a form, there are two identifications for that resource. The first reference is a 'Name' that identifies a resource by a name string. This Name reference is set to a default name and can be changed by the user. The second is a 'Resource ID' which is a numeric value. The SNDOPEN is implemented to accept the '@' to identify a resource by a name string reference.
I verified that the following instruction does work as implemented to use a form resource where 'ResName' is the name of the sound resource.SNDOPEN SNDFILE,"@ResName"Using the resource name with '@' didn't work for me the first time because the name is case sensitive. Also, if '@' is used, adding "MCI" to open will give I10 error. Microsoft media control interface will not see plform resources.