#include <include/contin_array.h>
Creates a continuous array from a finite array.
- Parameters
-
pcm_cont | Pointer to the destination array. |
pcm_cont_size | Size of pcm_cont. |
pcm_finite | Pointer to an array of samples or data. |
pcm_finite_size | Size of pcm_finite. |
finite_pos | Variable used internally. Must be set to 0 for the first run and not changed. |
- Note
- This function serves the purpose of e.g. having a set of audio samples stored in pcm_finite. This can then be fetched in smaller pieces into ram and played back in a loop using the results in pcm_cont. The function keeps track of the current position in finite_pos, so that the function can be called multiple times and maintain the correct position in pcm_finite.
- Return values
-
0 | If the operation was successful. |
-EPERM | If any sizes are zero. |
-ENXIO | On NULL pointer. |