|
|
#1 |
|
Junior Member
Join Date: May 2004
Posts: 5
|
dsp plugin prob
Hi - has anyone ever made a dsp plugin before?
if so, how does the short int *samples array hold the information? because it seems as though it goes from -32768 to 32768. if this is the case how is the sound data stored in this array? ta |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: May 2004
Posts: 5
|
anyone know anything about dsp plugins or is this just a forum for media library's?
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2004
Posts: 161
|
this is just guessing from looking at the example dsp plugins but, it looks like:
each item in the array holds the amplitude of the sound wave at a given point in time. The range used to store the amplitude depends on the bps parameter. bps is eather 16 (range -32768 to 32768) or 8 (-128 to 128). The number of cells in the array is the number of channels (nch) multiplied by the number of samples (numsamples). That all seems pretty certain. Taking a bigger guess, i'd say that the channels are interleaved in the array so that, if you have 2 channels then every even index in the array holds a sample for channel 1 (eg: left) and every odd index in the array holds a sample for channel 2. The alternative would be that all samples for channel 1 come first and then all samples for channel 2 however that would seem to be much more difficult to construct as the input plugin reads the file. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: May 2004
Posts: 5
|
cheers chris - cleared a few things up
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|