scummvm/backends/PalmOS/Src/snd_stream.cpp
Chris Apers 1f8f4c0ea3 Removed obsolete code
svn-id: r15044
2004-09-12 12:53:47 +00:00

28 lines
No EOL
628 B
C++

#include "stdafx.h"
#include "palm.h"
Err sndCallback(void* UserDataP, SndStreamRef stream, void* bufferP, UInt32 *bufferSizeP) {
SoundDataType *snd = (SoundDataType *)UserDataP;
UInt32 size = *bufferSizeP;
if (snd->set && snd->size) {
UInt32 *dst = (UInt32 *)bufferP;
UInt32 *src = (UInt32 *)snd->dataP;
size = (snd->size / 16);
while (size--) {
*dst++ = READ_LE_UINT32(src++);
*dst++ = READ_LE_UINT32(src++);
*dst++ = READ_LE_UINT32(src++);
*dst++ = READ_LE_UINT32(src++);
}
snd->set = false;
} else {
snd->size = size;
MemSet(bufferP, 128, 0);
*bufferSizeP = 128;
}
return errNone;
}