home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 106
/
af106sub.adf
/
datatypes.LZX
/
16sv_datatype
/
16sv.datatype.doc
< prev
next >
Wrap
Text File
|
1985-01-10
|
10KB
|
265 lines
TABLE OF CONTENTS
16sv.datatype/--datasheed--
16sv.datatype/--input_format--
16sv.datatype/DTM_WRITE
16sv.datatype/MAIN
16sv.datatype/OM_NEW
16sv.datatype/--datasheed-- 16sv.datatype/--datasheed--
NAME
16sv.datatype -- data type for IFF 16SV samples
SUPERCLASS
sound.datatype
DESCRIPTION
The 16sv datatype, a sub-class of the sound.datatype, is
used to load and save IFF 16SV samples.
This class is offloaded from the datatypes.library V45 example code
and is the reference implementation of a sound.datatype subclass
which supports saving in it's local format (as used by converters
like "DTConvert").
METHODS
OM_NEW -- Create a new sound object from a description file. The
source may be a file or a clipboard unit. An empty object
(DTST_RAM) can also be created.
OM_UPDATE -- Perform an ICM_CHECKLOOP check, and if succesfull, the
method will be executed like OM_SET downstairs.
OM_SET -- Pass msg to superclass and call GM_RENDER if retval from
superclass was != 0UL.
DTM_WRITE -- Save data in local (IFF 16SV) or superclass (IFF 8SVX)
format.
All other methods are passed unchanged to superclass.
ATTRIBUTES
Following attributes are set by the object and are READ-ONLY for
applications (if the datatype is used for saving (e.g. the
application creates an empty 16SV.datatype object and fills
in some required atrributes as shown in the "DTConvert" example),
these attributes are used by the encoder to create an IFF 16SV
sound file):
DTA_ObjName -- Set by an IFF NAME chunk. If missing,
DTA_ObjName will take DTA_Name's value.
DTA_ObjAuthor -- Set by an IFF AUTH chunk.
DTA_ObjAnnotation -- Set by an IFF ANNO chunk.
DTA_ObjCopyright -- Set by an IFF (C) chunk.
DTA_ObjVersion -- Set by an IFF FVER chunk.
SDTA_VoiceHeader -- Filled by the 16SV VHDR chunk
SDTA_Sample -- 8 bit sample data
SDTA_SampleLength -- length of 8 bit sample data
SDTA_Volume -- volume (got from the voiceheader)
SDTA_Period -- created from (VoiceHeader -> vh_SamplesPerSec)
and system's clock
BUGS
The project has been not very well tested yet. Therefore...
... no known bugs.
TODO
- Fixing the bugs above.
- Add stereo support, e.g. interleave the sound data when left/right
channels occur...
- Compression support (e.g. CMP_FIBDELTA).
- More speed during encoding.
- Support for SDTM_LOADFRAME / SDTM_UNLOADFRAME (implies also support
for 16-bit audio á la RTA / AHI).
HISTORY
V1.1
First public release.
V1.2
- Replaced stack swapping code by my "standard" module
- Minor source code cleanup.
- Improved the "smakefile" a little bit
SEE ALSO
sound.datatype
16sv.datatype/--input_format-- 16sv.datatype/--input_format--
NAME
IFF 16SV -- 16 bit Samples Voice
DESCRIPTION
FORM 16SV has the same format as FORM 8SVX except the normal BODY
chunk contains 16 bit samples instead of 8 bit samples.
SEE ALSO
- ARKM Devices: IFF part
- iffparse.library autodocs
- IFF 8SVX docs
16sv.datatype/DTM_WRITE 16sv.datatype/DTM_WRITE
NAME
DTM_WRITE -- Save data
FUNCTION
This method saves the object's contents to disk.
If dtw_Mode is DTWM_IFF, the method is passed unchanged to the
superclass, sound.datatype, which writes an IFF 8SVX sample.
If dtw_mode is DTWM_RAW, the object writes an IFF 16SV sample to
the filehandle given.
(If the class library was compiled with the NO_ENCODER switch
(not the default), result == 0 and resul2 == ERROR_NOT_IMPLEMENTED
are returned).
BUGS
- The encoder does not support compression. A request to save
compressed data returns DTERROR_UNKNOWN_COMPRESSION.
TAGS
None defined.
RESULT
Returns 0 for failure (IoErr() returns result2), non-zero
for success.
16sv.datatype/MAIN 16sv.datatype/MAIN
INTRODUCTION
Datatypes class for IFF 16SV samples. Based on the CBM datatypes
example source/ documents written by David Junod and infos got from
"SoundBox" by Richard Koerber.
REQUIREMENTS
- You need at least Kick/WB 3.0.
- "datatypes/sound.datatype", >= V39.
USAGE
If the datatypes descriptor file was activated, any attempt to load
an IFF 16SV sample using GMultiView, MultiView, AmigaGuide or
SwitchWindow will load and play the sample.
16sv.datatype supports also the clipboard as input, e.g.
"MultiView CLIPBOARD", ClipView or SwitchWindow are able to play
IFF 16SVs from clipboard.
If you want to save the current sample in 16sv.datatype's local
format, use MultiView's "Project/Save As..." menu (or GMultiView's
"Project/Save As Raw...").
INSTALLATION
After unpacking this archive:
Because this version does not include an Installer script, you have
to do the installation manually through the shell:
- Unpack this archive and copy the "16sv.datatype" to
SYS:Classes/DataTypes:
Copy CLONE FROM "16sv.datatype" TO "SYS:Classes/DataTypes/16sv.datatype"
- Then copy the datatypes descriptor into the DEVS:DataTypes
directory.
If the descriptor already exists, you should not replace it,
otherwise you may loose "toolnodes" and other settings stored in
the existing descriptor.
Copy CLONE FROM "16SV(%|.info)" TO DEVS:Datatypes/
SOURCE
This is the official datatypes.library V45 reference implementation
of a sound.datatype subclass which supports saving in it's local
format (such an encoder is used by "DTConvert" and other tools which
uses DataTypes for conversion, e.g. DataType -> DataType (e.g. MPEG
Audio -> IFF 16SV etc.)).
Source is fully included here.
AUTHOR
If you want to blame me, report any bugs, or wants a new version
send your letter to:
Roland Mainz
Hohenstaufenstraße 8
52388 Nörvenich
GERMANY
Phone: (+49)(0)2426/901568
Fax: (+49)(0)2426/901569
EMAIL is also available (if you want to send me attachments
larger than 1MB (up to 5MB, more with my permission):
GISBURN@w-specht.rhein-ruhr.de
Up to December 1997 I'm reachable using this email address, too:
Reinhold.A.Mainz@KBV.DE
| Please put your name and address in your mails !
| German mailers should add their phone numbers.
| See BUGS section above when submitting bug reports.
Sorry, but I can only look once a week for mails.
If you don't hear something from me within three weeks, please
send your mail again (but watch about new releases) (problems with
this email port are caused by reconfigurations, hackers, network
problems etc.).
The entire "16sv.datatype" package may be noncommercially
redistributed, provided that the package is always distributed
in it's complete form (including it's documentation). A small
copy fee for media costs is okay but any kind of commercial
distribution is strictly forbidden without my permission !
Comments and suggestions how to improve this program are
generally appreciated!
Thanks to David Junod, who wrote the datatypes environment and lots
of the datatypes example code, Richard Koerber for his "SoundBox",
Matt Dillon for his DICE, Olaf 'Olsen' Barthel for his help,
ideas and some text clips from his documentations.
16sv.datatype/OM_NEW 16sv.datatype/OM_NEW
NAME
OM_NEW -- Create a 16sv.datatype object.
FUNCTION
The OM_NEW method is used to create an instance of the 16sv.datatype
class. This method is passed to the superclass first. After this,
16sv.datatype parses the file and loads the sample.
ATTRIBUTES
The following attributes can be specified at creation time.
DTA_SourceType (ULONG) -- Determinates the type of DTA_Handle
attribute. DTST_FILE, DTST_CLIPBOARD and DTST_RAM are supported.
If any other type was set in a given DTA_SourceType,
OM_NEW will be rejected.
Defaults to DTST_FILE.
DTA_Handle -- For both supported DTST_FILE and DTST_CLIPBOARD, a
(struct IFFHandle *) is expected.
(DTST_FILE expects a IFF Stream handle because this is a IFF
type DataType (DTF_IFF)).
A DTST_RAM (create empty object) source type requires a NULL
handle.
NOTE
If the datatype was compiled with the NO_ENCODER flag set,
DTA_SourceType == DTST_RAM causes OM_NEW to reject the method.
RESULT
If the object was created a pointer to the object is returned,
otherwise NULL is returned.