Add file to gapless queue. (ANSI version)
__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 |
1 |
All OK. |
0 |
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.
// 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);
// 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 |