/*********************************************
*           SeamlessBufferManagement.h
*
*            Variable speed playback
*                  ver. 1.00
*
**********************************************/

#ifndef _SBM_
#define _SBM_

/* use this define for interleaved PCM stream processing */
#define SBM_INTERLEAVED


/* Processing routine */
#ifdef SBM_INTERLEAVED
extern int SBM_Exe(short (*out)[2], const short (*in)[2], int n);
#else
extern int SBM_Exe(short* left, short* right, int n);
#endif
/* Call with left=right for mono processing (result will be placed into outleft)
*/

/* Setting levels for pitch shift and level modification */
extern void SBM_SetPar(float level);
/* Supported values for pitch {0..14}
0.5 - twice slower
1.0 - bypass
2.0 - twice faster
*/

/* Initialization */
extern void SBM_Init(int fs);

/*
Using Example:
SBM_Init(Fs);
SBM_SetPar(1.5f);  // set 50% speed up

SBM_Exe( out, in, n);       // process stereo PCM stream
*/

#endif // _SBM_

