Huron & SNAP Documentation
Huron & SNAP Documentation
Huron & SNAP Documentation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
OTHER SIMULATION TOOLS<br />
<strong>SNAP</strong>SetWaveHeader<br />
When downloading fresh wave data to the <strong>Huron</strong> from the<br />
remote computer this command must be sent prior to the<br />
sending the data for the wave.<br />
in long lWaveID The waveID that you want to assign to this wave. If the<br />
waveID is already taken by another wave, that wave has the ID<br />
removed from it. A single wave can be assigned multiple<br />
waveIDs. It is removed from the WavePlayer’s memory when<br />
its last ID is removed.<br />
in long lFrames Number of frames in the waveform. A frame contains a<br />
sample for each channel.<br />
in long lSRate Sample rate of the wave.<br />
in long lLoopType Currently ignored. If loopStart is less than loopEnd then the<br />
wave will loop forward, otherwise the wave will only play<br />
once when triggered<br />
in long lLoopStart Start sample of loop<br />
in long lLoopEnd End sample of loop<br />
in const char* szWaveName Name of the wave<br />
in long lChecksum Checksum<br />
<strong>SNAP</strong>SetWaveSamples<br />
Once the header has been sent the data can be sent using the<br />
<strong>SNAP</strong>SetWaveSamples command.<br />
in long lWaveID The waveID that you sent in the <strong>SNAP</strong>SetWaveHeader<br />
command<br />
in long lChannel Channel number. As only mono waves are supported this field<br />
is ignored.<br />
in long lOffset Offset in samples from the start of the waveform that this data<br />
is for.<br />
in long lLength Number of samples that is being set.<br />
in short* psSamples The data. Only HURONTCP_MAX_SAMPLES (defined in<br />
<strong>Huron</strong>TCP.h) may be transferred with one command. If your<br />
wave is bigger then you must split the wave into chunks and<br />
send it piece by piece.<br />
<strong>SNAP</strong>SaveTransferWave<br />
Once all the data has been sent to <strong>Huron</strong> the<br />
<strong>SNAP</strong>SaveTransferWave command must be sent. This<br />
command will cause the data to be saved to <strong>Huron</strong>’s disk and<br />
transferred to the WavePlayer’s memory.<br />
in long lWaveID The waveID that you sent in the <strong>SNAP</strong>SetWaveHeader<br />
command<br />
<strong>SNAP</strong>LoadWave<br />
If the wave required is already stored locally on the <strong>Huron</strong>, this<br />
command may be sent. The <strong>Huron</strong> will attempt to find the<br />
wave at the specified path. The <strong>Huron</strong> stores wave data in SIM<br />
files. See the SIM Tools section in this manual for an<br />
explanation of the SIM file format.<br />
If the load message is not received, a -1 is returned in the data<br />
field.<br />
HURON TECHNICAL MANUAL PAGE 175