ok so i was messing around with peter's waveout plugin and the original cnv_pcmwaveout that was shipped with build 488. this is the code i use to pass data to the converters but for some reason it doesn't work with WA3's original converter. peter's plugin works fine though.
This is code I used to play a file (stripped-down version of Soundsys' core implementation)
code:
unsigned long WINAPI SoundsysCore::process(LPVOID v)
{
int g = -1;
SoundsysCore* _this=(SoundsysCore *)v;
FILE* pFile;
pFile = FOPEN(_this->_file, "rb");
while (_this->playing)
{
if (!_this->_pause)
{
g = FREAD(_this->mp3, 1, 1000, pFile);
_this->ChainFood->setChunk("MP3", _this->mp3, g);
if (_this->playing && !_this->_pause)
{
_this->In->processData(_this->Inf, _this->ChainFood, &_this->killswitch);
_this->Out->processData(_this->Inf, _this->ChainFood, &_this->killswitch);
_this->ChainFood->delAllChunks();
}
}
}
_this->In->ccb_notify(CoreCallback::SEEKED, 0);
_this->Out->ccb_notify(CoreCallback::SEEKED, 0);
_this->In->ccb_notify(CoreCallback::ABORTCURRENTSONG);
_this->Out->ccb_notify(CoreCallback::ABORTCURRENTSONG);
_this->ChainFood->delAllChunks();
FCLOSE(pFile);
pFile = NULL;
return 0;
}
In == cnv_mp3pcm
Out == cnv_pcmwaveout
Out is assigned by checking if getConverterTo() returns "WAVEOUT" (for original cnv) or "OUTPUT:waveOut" (for peter's cnv).
anyone know what i'm doing wrong?