Using of dynamic stream.
When you open some disk file, you are using static stream. This means that whole file is accessible, you have whole song in one place. The same situation is when you open some memory stream containing whole song.
But, what if you don't have all data. If you are using some internet streaming. Dynamic stream is solution.
ZPlay class supports dynamic streams. User can add new data into this stream while song is playing.
First, open memory stream as dynamic stream using some initial music data and start playing. When you have more data, add this new data to stream. Stream will continue to play using this new added data. If stream runs out of data, it waits until user sends new data.
User can use callback mechanism with callback messages MsgStreamBufferDone and MsgStreamNeedMoreData to determine if stream is low with data. Or use additional functions to get stream status.
Use this:
C++ |
C |
VB.NET |
C#.NET |
VC.NET |
Delphi |
Copyright (c) 2010. Zoran Cindori - All rights reserved.
Web: http://libzplay.sourceforge.net/ Email: zcindori@inet.hr |