|
Overview
The CRE_TRON API was originally designed to be a minimum-bandwidth interface
to control a virtual aural environment.
A hardware-layer serial protocol (called "ATRON") was
designed with a bit-rate of less than 6 kbaud base plus 4 kbaud per moving sound source for a
30 Hz environment.
The CRE_TRON API brought this hardware layer out to the "C" application
level, nearly one for one.
The thin layer between the CRE_TRON interface and the ATRON
protocol allows for very thin client layers and virtually no load on simulation hosts to
add advanced audio simulation with a client-server architecture.
The CRE_TRON API was
heralded as easy to program by the early application programmers.
The CRE_TRON API Datasheet is available ...
Download (PDF 526KB)
-
Object Oriented
The CRE_TRON API is object-oriented in design, although exposed in straight "C"
programming language.
The basic objects are
- System - independent virtual aural environment
- Listener - represents each pair of ears in the aural environment
- Sound Source - represents each sound emitting location in the aural environment
- Propagation Medium - represents each volume of aural medium in the aural environment
The underlying audio simulation system was built in 1991 with Borland's Turbo C++.
A 32-bit
protected-mode version was maintained in Zortech C++, using the Pharlap 32-bit DOS-Extender.
In those days, C++ was so new that there simply were no other commercially available C++ compilers.
None of Microsoft, Watcom, Metrowerks, Symantec, and GNU had C++ technology,
so the interface was created and published in ANSI C
for portability between the UNIX, Mac, and PC.
CRE_TRON does not support dynamic object creation and deletion.
This feature is inherited from CRE_TRON's hardware-based founding.
If one has two Convolvotron's available
to use, and only two (ie. fixed resources), then dynamic object creation has no real purpose.
The initialization call creates all of the requested object resources and has them ready for
instant use at any time during a simulation.
-
High-Level, Low-Bandwidth
CRE_TRON sits at a mid to high level for an audio application interface.
This is a calculated trade-off of flexibility versus convenience.
For example, Microsoft's DirectSound3D is implemented at the buffer level of DirectSound.
While this gives the programmer more flexibility to directly manipulate buffers,
it also mandates that the programmer perform more overhead and audio management.
And while CRE_TRON provides a good isolation from nuts and bolts audio management,
many AuSIM customers
still contract AuSIM to build higher-level wrappers around CRE_TRON.
-
Well Supported
The major benefit of the CRE_TRON API is that it is well-used and
supported around the world, for over two decades.
The Application Programming Interface (API)
The basic interface with overview is given below.
Details of each function and its proper use can be found in the respective sub-API documents
CRE_TRON and
CRE_WAVE.
- System Functions
System functions control the renderer independent of any specific
listener, sound-source, propagation-medium, and wavefile object.
The "init" and "close" pair define an aural simulation.
The "update" synchronizes objects into time frames.
int cre_init (int driver, int head, int sources, int mode);
int cre_close (int driver, int head);
int cre_update_audio (void);
- Listener Functions
Listener functions set properties specific to a given listener object.
The "define" sets listener properties, such as
location offsets, HRTF filter data, near-field modeling, display type,
and other listener characteristics.
The "locate" sets the listener position and orientation for each frame
of the simulation.
int cre_define_head (int id, int prm, int pts, const void *data);
int cre_locate_head (int id, const float *hloc);
- SoundSource Functions
Sound-source functions set properties specific to a given sound-source object.
The "define" sets sound-source properties, such as
radiation pattern, localization control, rendering priority,
signal source, Doppler factor, delay control, and rolloff.
int cre_select_source (int id, int input);
int cre_define_source (int id, int prm, int pts, const void *data);
int cre_locate_source (int id, const float *sloc);
int cre_amplfy_source (int id, float dB);
- PropagationMedium Functions
Medium functions set properties specific to a given propagation medium object.
int cre_define_medium (int volm, int prm, int pts, const void *data);
- Wavefile Functions
Wavefile functions set properties specific to a given wavefile object.
wavFt *cre_open_wave (const char *wavefile, int mode);
int cre_ctrl_wave (int src, wavFt *wave, int cmd, void *data);
int cre_close_wave (wavFt *wave);
|