spAudio
Loading...
Searching...
No Matches
spInputPlugin.h File Reference
Include dependency graph for spInputPlugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

long spReadPlugin (spPlugin *plugin, void *data, long length)
 
long spReadPluginInByte (spPlugin *plugin, void *data, long data_size)
 
long spReadPluginDoubleWeighted (spPlugin *plugin, double *data, long length, double weight)
 
long spReadPluginDouble (spPlugin *plugin, double *data, long length)
 
spBool spSeekPlugin (spPlugin *plugin, spLong pos)
 
spLong spGetPluginTotalLength (spPlugin *plugin)
 

Function Documentation

◆ spReadPlugin()

long spReadPlugin ( spPlugin * plugin,
void * data,
long length )
extern

Read data from a file by using a plugin. The difference from spReadPluginInByte() is how to specify the size of data.

Parameters
[in]pluginspPlugin pointer obtained by spOpenFilePlugin() .
[out]dataData buffer to hold read data. The type of data depends on bits/sample of data; short for 8/16 bits, long for 24/32 bits, and double for 64 bits.
[in]lengthThe length of data . Note that this length is not identical to duration in points.
Returns
Read length. This value is the same as length if successful.

◆ spReadPluginInByte()

long spReadPluginInByte ( spPlugin * plugin,
void * data,
long data_size )
extern

Read data from a file by using a plugin. The difference from spReadPlugin() is how to specify the size of data.

Parameters
[in]pluginspPlugin pointer obtained by spOpenFilePlugin() .
[out]dataData buffer to hold read data. The type of data depends on bits/sample of data; short for 8/16 bits, long for 24/32 bits, and double for 64 bits.
[in]data_sizeThe size of data in bytes.
Returns
Read size in bytes. This value is the same as data_size if successful.

◆ spReadPluginDoubleWeighted()

long spReadPluginDoubleWeighted ( spPlugin * plugin,
double * data,
long length,
double weight )
extern

Read data from a file by using a plugin. The value of the data must be basically from -1 to 1 inclusive. The difference from spReadPluginInByte() is how to specify the size of data.

Parameters
[in]pluginspPlugin pointer obtained by spOpenFilePlugin() .
[out]dataData buffer to hold read data. The type of data depends on bits/sample of data; short for 8/16 bits, long for 24/32 bits, and double for 64 bits.
[in]lengthThe length of data . Note that this length is not identical to duration in points.
[in]weightThis value is multiplied to the data after reading.
Returns
Read length. This value is the same as length if successful.

◆ spReadPluginDouble()

long spReadPluginDouble ( spPlugin * plugin,
double * data,
long length )
extern

Read data from a file by using a plugin. The value of the data must be basically from -1 to 1 inclusive. The difference from spReadPluginInByte() is how to specify the size of data.

Parameters
[in]pluginspPlugin pointer obtained by spOpenFilePlugin() .
[out]dataData buffer to hold read data. The type of data depends on bits/sample of data; short for 8/16 bits, long for 24/32 bits, and double for 64 bits.
[in]lengthThe length of data . Note that this length is not identical to duration in points.
Returns
Read length. This value is the same as length if successful.

◆ spSeekPlugin()

spBool spSeekPlugin ( spPlugin * plugin,
spLong pos )
extern

Move the position pointer to the specified position.

Parameters
[in]pluginspPlugin pointer obtained by spOpenFilePlugin() .
[in]posOffset time in points.
Return values
SP_TRUESuccess
SP_FALSEFailure

◆ spGetPluginTotalLength()

spLong spGetPluginTotalLength ( spPlugin * plugin)
extern

Get the total duration of the file by using a plugin. Note that the function call for some file formats returns always 0.

Parameters
[in]pluginspPlugin pointer obtained by spOpenFilePlugin() .
Returns
The total duration in points of the file.