Check if stream data is free.
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 |
1 |
sMemNewData isn't in stream anymore, you can destroy this data. |
0 |
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 ...
instance->PushDataToStream(tmp, 8000); // push data to stream if(instance->IsStreamDataFree(tmp)) // check if this data is still in stream free(tmp);
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 |