libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
ZPlay::IsStreamDataFree Method

Check if stream data is free.

C++
virtual __stdcall int IsStreamDataFree(const void * sMemNewData) = 0;
Parameters 
Description 
const void * sMemNewData 
Pointer to memory block. This must be one of values added with PushDataToStream or zplay_PushDataToStream
Return Values 
Description 
sMemNewData isn't in stream anymore, you can destroy this data. 
sMemNewData is still in stream, don't destroy this data yet. 

When you push memory block to non buffered stream with PushDataToStream or zplay_PushDataToStream you need to keep this data into memory because class is using this data. With this function you can check is specified buffer (pointer) is in stream queue. If specified buffer is free, you can destroy this data, free memory ...

ZPlay C++ Class interface

instance->PushDataToStream(tmp, 8000); // push data to stream
if(instance->IsStreamDataFree(tmp)) // check if this data is still in stream
  free(tmp);

 

C Style interface

zplay_PushDataToStream(instance, tmp, 8000); // push data to stream
if(zplay_IsStreamDataFree(instance, tmp)) // check if this data is still in stream
  free(tmp);
Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr