libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
libZPlayCpp::zplay_AddFile Function

Add file to gapless queue. (ANSI version)

C++
__stdcall __declspec(dllimport) int zplay_AddFile(ZPLAY_HANDLE handle, const char * sFileName, TStreamFormat nFormat);
Parameters 
Description 
ZPLAY_HANDLE handle 
ZPLAY handle. Get this handle with zplay_CreateZPlay
const char * sFileName 
Pointer to a ANSI null-terminated string that specifies the name of the file. 
TStreamFormat nFormat 
Stream format. Use sfAutodetect if you need to autodetect stream format of specified file. 
Return Values 
Description 
All OK. 
Error. To get error message read here

All streams added to gapless queue will play without gap between these streams. When one stream ends, next stream from queue starts playing without interruption. Position marker is set to 0 for each stream from queue. This means that when one stream ends, position is set to 0 for next stream. Position is not cumulated. 

You can clear gapless queue with Close or zplay_Close function. 

 

Play gapless 3 songs. 

ZPlay C++ Class interface  

// add first song
instance->AddFile("myFirstSong.mp3", sfAutodetect);
// then add second song to gapless queue
instance->AddFile("mySecondSong.mp3", sfAutodetect);
// then add third song to gapless queue
instance->AddFile("myThirdSong.ogg", sfAutodetect);

 

C Style interface

// add first song
zplay_AddFile(instance, "myFirstSong.mp3", sfAutodetect);
// then add second song to gapless queue
zplay_AddFile(instance, "mySecondSong.mp3", sfAutodetect);
// then add third song to gapless queue
zplay_AddFile(instance, "myThirdSong.ogg", sfAutodetect);
Copyright (c) 2010. Zoran Cindori - All rights reserved.

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

Email: zcindori@inet.hr