home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
TUNEPL.ZIP
/
tuneplay.doc
< prev
next >
Wrap
Text File
|
1992-11-12
|
3KB
|
75 lines
This utility will play 'tunes' on your PC speaker that have been created
with the 'Tune Editor' mini-application in the OS/2 'Productivity Tools'
folder. It can run in the background or as part of a batch job. Typing
'tuneplay' without parameters will display the following usage info:
-----------------------------------------------------------------
TunePlayer V1.0, Copyright (c) 1992, CoralSoft, Inc.
Usage:
tuneplay [tune file] [tune number]
Where [tune file] = Data file created by 'Tune Editor'
application (*.$$a)
[tune number] = Number of the tune (0-9A-Z)
TunePlay allows background or batch playing of tunes
created with the OS/2 Tune Editor, found in the OS/2
Productivity Folder. When you save a tune file, it
is given the extension '.$$a'. By default, these files
are stored on your boot drive in the \OS2\APPS directory
By specifying '*' for the tune number, all tunes in the
file will be played with a slight pause between each.
-----------------------------------------------------------------
For example:
tuneplay c:\os2\apps\pmdiary.$$a z
This example will play tune 'Z' from the default PMDiary tune file.
By default, it is 'The Yellow Rose of Texas'.
In a batch file, you could start TunePlayer as a detached program:
detach tuneplay mytunes.$$a 0
***********************************************************************
This archive consists of the following files:
TUNEPLYR.DOC This file
TUNEPLAY.EXE Executable TunePlayer app.
TUNEPLAY.C C Source Code for TunePlayer app.
TUNEPLYR.C C Source Code for TunePlayer module
TUNEPLYR.H C Header File for TunePlayer module
***********************************************************************
If you only want to use the included application, you may delete the
*.c and *.h files.
- - - D e v e l o p e r N o t e s - - -
If you want to include this code into your own application, compile
TUNEPLYR.C and link the object module into your executable. You will
also need to include "TUNEPLYR.H".
With IBM C Set/2:
icc /Ss /O /C tuneplyr.c
link386 /PM:VIO tuneplyr.obj+mayapp.obj,myapp.exe;
Look at TUNEPLAY.C for an example of calling the TunePlayer functions:
int createTune(PSZ tuneFile, BYTE tuneNo, PTUNENOTE *tuneBase, PBYTE tuneName);
void playTune(PTUNENOTE base);
void closeTune(PTUNENOTE base);
Note that 'createTune' will allocate memory (with malloc) and store the
base of a linked list of notes in 'tuneBase'. To properly free the memory
associated with 'createTune', you must call the 'closeTune' function.
If 'createTune' fails, the 'tuneBase' parameter will be set to NULL.
Brought to you by...
Steve Horne / CoralSoft, Inc.