libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
ZPlay::OpenFile Method

Open disk file (ANSI version).

C++
virtual __stdcall int OpenFile(const char * sFileName, TStreamFormat nFormat) = 0;
Parameters 
Description 
const char * sFileName 
Points to a ANSI 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 
All OK. 
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.
 

 

ZPlay C++ Class interface

if(instance->OpenFile("mySong.mp3", sfAutodetect) == 0)
{
  MessageBox(0, instance->GetError(),"Error",0);
  return 0;
}

 

C Style interface

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