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

Load ID3 data from specified file. (UNICODE version)

C++
virtual __stdcall int LoadFileID3W(const wchar_t * pchFileName, TStreamFormat nFormat, TID3Version nId3Version, TID3InfoW * pId3Info) = 0;
Parameters 
Description 
const wchar_t * pchFileName 
Points to a UNICODE 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. 
TID3Version nId3Version 
ID3 version.
Note: This value is only used for sfMp3 stream format. For all other stream formats this parameter is ignored. 
TID3InfoW * pId3Info 
Pointer to TID3InfoW structure receiving ID3 data. User must allocate memory for this structure. 
Return Values 
Description 
All OK. 
Error. To get error message read here

Check supported formats for info tag support. Some formats can support some sort of "Info tags", but not all. 

libZPlay library implements "ID3 tag" interface to different info tags (VORBIS comment, RIFF Info, ...). So, you can retrieve ID3 informations from different streams (mp3, ogg, flac, wav) because library will convert "format specific tag" to ID3 tag info. 

Note: Use this function if you just need ID3 data and you don't need to play this file. This function only loads ID3 data. There is no checking if this is valid file, wave output isn't open ... This function has no effect on currently open file or stream. 

Load ID3 info from specified file. 

ZPlay C++ Class interface  

TId3InfoW id3_info;
if(instance->LoadFileID3W(L"mySong.ogg", sfAutodetect, id3Version2, &id3_info))
{
  wprintf(L"Title:   %s\n", id3_info.Title);
  wprintf(L"Artist:  %s\n", id3_info.Artist);
  wprintf(L"Album:   %s\n", id3_info.Album);
  wprintf(L"Year:    %s\n", id3_info.Year);
  wprintf(L"Comment: %s\n", id3_info.Comment);
  wprintf(L"Genre:   %s\n", id3_info.Genre);
  wprintf(L"Track:   %s\n", id3_info.TrackNum);
}

 

C Style interface

TId3InfoW id3_info;
if(zplay_LoadID3W(instance, L"mySong.ogg", sfAutodetect, id3Version2, &id3_info))
{
  wprintf(L"Title:   %s\n", id3_info.Title);
  wprintf(L"Artist:  %s\n", id3_info.Artist);
  wprintf(L"Album:   %s\n", id3_info.Album);
  wprintf(L"Year:    %s\n", id3_info.Year);
  wprintf(L"Comment: %s\n", id3_info.Comment);
  wprintf(L"Genre:   %s\n", id3_info.Genre);
  wprintf(L"Track:   %s\n", id3_info.TrackNum);
}
Copyright (c) 2010. Zoran Cindori - All rights reserved.

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

Email: zcindori@inet.hr