<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><div>> Note one detail: it is declared there as __stdcall, not as __cdecl, so perhaps this has something to do with it?<br>> <br>> @Fred: Also note that the type HANDLE is defined there as a pointer, so [as a sanity test of sorts] sizeof(Handle {in pascal}) should be equal to sizeof(HANDLE /*in C/C++*/).<br>> <br>> --<br>> Ewald<br><br>Yep, there is a brand new wrapper from trunk :<br><br>//////////////////////////////////////////////////////////////////////////////
<br>///
<br>/// SoundTouch DLL wrapper - wraps SoundTouch routines into a Dynamic Load
<br>/// Library interface.
<br>///
<br>/// Author : Copyright (c) Olli Parviainen
<br>/// Author e-mail : oparviai 'at' iki.fi
<br>/// SoundTouch WWW: http://www.surina.net/soundtouch
<br>///
<br>////////////////////////////////////////////////////////////////////////////////
<br>//
<br>// $Id: SoundTouchDLL.h 94 2010-12-12 18:28:49Z oparviai $
<br>//
<br>////////////////////////////////////////////////////////////////////////////////
<br>//
<br>// License :
<br>//
<br>// SoundTouch audio processing library
<br>// Copyright (c) Olli Parviainen
<br>//
<br>// This library is free software; you can redistribute it and/or
<br>// modify it under the terms of the GNU Lesser General Public
<br>// License as published by the Free Software Foundation; either
<br>// version 2.1 of the License, or (at your option) any later version.
<br>//
<br>// This library is distributed in the hope that it will be useful,
<br>// but WITHOUT ANY WARRANTY; without even the implied warranty of
<br>// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
<br>// Lesser General Public License for more details.
<br>//
<br>// You should have received a copy of the GNU Lesser General Public
<br>// License along with this library; if not, write to the Free Software
<br>// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<br>//
<br>////////////////////////////////////////////////////////////////////////////////
<br> <br>#ifndef _SoundTouchDLL_h_
<br>#define _SoundTouchDLL_h_
<br> <br>#ifdef __cplusplus
<br> <br>#ifdef DLL_EXPORTS
<br> #define SOUNDTOUCHDLL_API extern "C" __declspec(dllexport)
<br>#else
<br> #define SOUNDTOUCHDLL_API extern "C" __declspec(dllimport)
<br>#endif
<br> <br>#else
<br> <br>#ifdef DLL_EXPORTS
<br> #define SOUNDTOUCHDLL_API __declspec(dllexport)
<br>#else
<br> #define SOUNDTOUCHDLL_API __declspec(dllimport)
<br>#endif
<br> <br>#endif // __cplusplus
<br> <br>typedef void * HANDLE;
<br> <br>/// Create a new instance of SoundTouch processor.
<br>SOUNDTOUCHDLL_API HANDLE __cdecl soundtouch_createInstance();
<br> <br>/// Destroys a SoundTouch processor instance.
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_destroyInstance(HANDLE h);
<br> <br>/// Get SoundTouch library version string
<br>SOUNDTOUCHDLL_API const char *__cdecl soundtouch_getVersionString();
<br> <br>/// Get SoundTouch library version string - alternative function for
<br>/// environments that can't properly handle character string as return value
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_getVersionString2(char* versionString, int bufferSize);
<br> <br>/// Get SoundTouch library version Id
<br>SOUNDTOUCHDLL_API unsigned int __cdecl soundtouch_getVersionId();
<br> <br>/// Sets new rate control value. Normal rate = 1.0, smaller values
<br>/// represent slower rate, larger faster rates.
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_setRate(HANDLE h, float newRate);
<br> <br>/// Sets new tempo control value. Normal tempo = 1.0, smaller values
<br>/// represent slower tempo, larger faster tempo.
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_setTempo(HANDLE h, float newTempo);
<br> <br>/// Sets new rate control value as a difference in percents compared
<br>/// to the original rate (-50 .. +100 %);
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_setRateChange(HANDLE h, float newRate);
<br> <br>/// Sets new tempo control value as a difference in percents compared
<br>/// to the original tempo (-50 .. +100 %);
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_setTempoChange(HANDLE h, float newTempo);
<br> <br>/// Sets new pitch control value. Original pitch = 1.0, smaller values
<br>/// represent lower pitches, larger values higher pitch.
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_setPitch(HANDLE h, float newPitch);
<br> <br>/// Sets pitch change in octaves compared to the original pitch
<br>/// (-1.00 .. +1.00);
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_setPitchOctaves(HANDLE h, float newPitch);
<br> <br>/// Sets pitch change in semi-tones compared to the original pitch
<br>/// (-12 .. +12);
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_setPitchSemiTones(HANDLE h, float newPitch);
<br> <br> <br>/// Sets the number of channels, 1 = mono, 2 = stereo
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_setChannels(HANDLE h, unsigned int numChannels);
<br> <br>/// Sets sample rate.
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_setSampleRate(HANDLE h, unsigned int srate);
<br> <br>/// Flushes the last samples from the processing pipeline to the output.
<br>/// Clears also the internal processing buffers.
<br>//
<br>/// Note: This function is meant for extracting the last samples of a sound
<br>/// stream. This function may introduce additional blank samples in the end
<br>/// of the sound stream, and thus it's not recommended to call this function
<br>/// in the middle of a sound stream.
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_flush(HANDLE h);
<br> <br>/// Adds 'numSamples' pcs of samples from the 'samples' memory position into
<br>/// the input of the object. Notice that sample rate _has_to_ be set before
<br>/// calling this function, otherwise throws a runtime_error exception.
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_putSamples(HANDLE h,
<br> const float *samples, ///< Pointer to sample buffer.
<br> unsigned int numSamples ///< Number of samples in buffer. Notice
<br> ///< that in case of stereo-sound a single sample
<br> ///< contains data for both channels.
<br> );
<br> <br>/// Clears all the samples in the object's output and internal processing
<br>/// buffers.
<br>SOUNDTOUCHDLL_API void __cdecl soundtouch_clear(HANDLE h);
<br> <br>/// Changes a setting controlling the processing system behaviour. See the
<br>/// 'SETTING_...' defines for available setting ID's.
<br>///
<br>/// \return 'TRUE' if the setting was succesfully changed
<br>SOUNDTOUCHDLL_API BOOL __cdecl soundtouch_setSetting(HANDLE h,
<br> int settingId, ///< Setting ID number. see SETTING_... defines.
<br> int value ///< New setting value.
<br> );
<br> <br>/// Reads a setting controlling the processing system behaviour. See the
<br>/// 'SETTING_...' defines for available setting ID's.
<br>///
<br>/// \return the setting value.
<br>SOUNDTOUCHDLL_API int __cdecl soundtouch_getSetting(HANDLE h,
<br> int settingId ///< Setting ID number, see SETTING_... defines.
<br> );
<br> <br> <br>/// Returns number of samples currently unprocessed.
<br>SOUNDTOUCHDLL_API unsigned int __cdecl soundtouch_numUnprocessedSamples(HANDLE h);
<br> <br>/// Adjusts book-keeping so that given number of samples are removed from beginning of the
<br>/// sample buffer without copying them anywhere.
<br>///
<br>/// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
<br>/// with 'ptrBegin' function.
<br>SOUNDTOUCHDLL_API unsigned int __cdecl soundtouch_receiveSamples(HANDLE h,
<br> float *outBuffer, ///< Buffer where to copy output samples.
<br> unsigned int maxSamples ///< How many samples to receive at max.
<br> );
<br> <br>/// Returns number of samples currently available.
<br>SOUNDTOUCHDLL_API unsigned int __cdecl soundtouch_numSamples(HANDLE h);
<br> <br>/// Returns nonzero if there aren't any samples available for outputting.
<br>SOUNDTOUCHDLL_API int __cdecl soundtouch_isEmpty(HANDLE h);
<br> <br>#endif // _SoundTouchDLL_h_
<br> <br><br></div> </div></body>
</html>