Displaying 1 result from an estimated 1 matches for "playbackthread".
2001 Jul 05
1
Streaming buffers/ov_read question
...preciate some help.
notes:
test.ogg in my code was a song that i converted to the vorbis format
(Gorillaz - Cling Eastwood)
pcmData is defined like this: char pcmData[4096];
the ogg file and the directsound buffer (lpdsBuffer and vorbisFile) have
already been set up properly.
// code start
void PlaybackThread(void *param)
{
UCHAR *ptr1, *ptr2;
DWORD len1, len2;
long retVal;
int bytes_to_read = 4096;
int writeCursor = 0;
int bufferReadCursor = 0;
bool begPlay = true;
int len1_copy, len2_copy;
HWND hDlg = (HWND)param;
while (!eof)
{
if (bufferReadCursor > 4096)
{
// fill more data in...