Open disk file (UNICODE version).
__stdcall __declspec(dllimport) int zplay_OpenFileW(ZPLAY_HANDLE handle, const wchar_t * sFileName, TStreamFormat nFormat);
Parameters |
Description |
ZPLAY_HANDLE handle |
ZPLAY handle. Get this handle with zplay_CreateZPlay. |
const wchar_t * sFileName |
Points to a UNICODE null-terminated string that specifies the name of the file. Special case: Open wave input. |
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. |
Use this function to open disk file. Function will open disk file and check if this file is valid file according to specified stream format. If you use sfAutodetect as nFormat parameter function will try to detect stream format of specified file and open file using detected stream format.
Note: |
With this function you can also open wave input as recoring source. Read more here. |
if(instance->OpenFile("mySong.mp3", sfAutodetect) == 0) { MessageBox(0, instance->GetError(),"Error",0); return 0; }
if(zplay_OpenFile(instance, "mySong.mp3", sfAutodetect) == 0) { MessageBox(0, zplay_GetError(instance),"Error",0); return 0; }
Copyright (c) 2010. Zoran Cindori - All rights reserved.
Web: http://libzplay.sourceforge.net/ Email: zcindori@inet.hr |