Comparisonics API

home
about us
articles
audio editor
comparisonics api
FindSounds.com
FindSounds for Android
FindSounds Mobile
FindSounds Palette
sound matching
waveform display
CS_process_sample( ) is called once for each sample value of an audio clip, as part of the indexing process.

void  CS_process_sample(
     CS_Sample_Processor  sp,  /* pointer to an internal data structure */
     CS_Sample_Value  value  /* sample value */
);

Parameters

sp Identifies the internal data structure used for indexing this clip.  This structure was created by a call of CS_create_sample_processor( ).
value Specifies the next sample value of this clip.

Remarks

The sample values of the audio clip are passed in sequence through successive calls of this function, where each call refers to the same internal data structure.  It is assumed that this sequence of sample values belongs to a single (mono) audio channel.  For stereo data, the left values may be passed in sequence to index the left channel.  Using a separate internal data structure, the right values may be passed in sequence to index the right channel.  Alternatively, stereo data can be indexed as a single channel by passing the sum (or average) of the left and right values for each sample.

Sample values are passed as signed, 32-bit integers.  All audio resolutions up to 32 bits are supported.

Because sample values are passed one at a time, the application may utilize any mechanism for buffering audio data.

After all of the sample values have been passed, CS_get_signature( ) may be called to obtain the signature that characterizes the audio clip.

A sample value of zero is interpreted as silence.  An audio clip that was recorded with a noticeable DC offset will not be indexed properly; such a clip should have its DC offset removed prior to indexing.

This function has no effect if the sp parameter is NULL.

© 2016 Comparisonics Corporation