LibZPlay wrapper (updated)
LibZPlay wrapper (updated)
Hey,
I have updated TS-Soft's wrapper of LibZPlay to include some functions from the 2.0 release.
See this page for downloads.
The original post is here.
Cheers,
Erion
I have updated TS-Soft's wrapper of LibZPlay to include some functions from the 2.0 release.
See this page for downloads.
The original post is here.
Cheers,
Erion
To see a world in a grain of sand,
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
Re: LibZPlay wrapper (updated)
Ooooh, I needed this! Thanks 

Re: LibZPlay wrapper (updated)
Great work from Erion and TS-Soft. Unfortunately, I got one problem. The following code produces two linker errors of the type "unresolved external symbol":
I cannot see the reason for it!
Code: Select all
XIncludeFile "libzplay.pbi"
hZPlay = CreateZPlay()
zplay_SetWaveInDevice(hZPlay, 0)
num = zplay_EnumerateWaveIn(hZPlay)
PB 5.60 - Windows 10
Re: LibZPlay wrapper (updated)
The reason you are getting those is because you are compiling using the x64 version of PB.
Since LibZPlay is a 32 bit library, it will only compile using the 32 bit version of PB.
Erion
Since LibZPlay is a 32 bit library, it will only compile using the 32 bit version of PB.
Erion
To see a world in a grain of sand,
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
Re: LibZPlay wrapper (updated)
Erion, thanks for your reply. But this is not the reason, because I use the x86-Version of PB. What is rather interesting is the fact, that all the functions you added to the include produce this linker error.
By the way, I just posted the following in the german forum: There's a little typo in TS-Soft's include-file. The correct definition is:
By the way, I just posted the following in the german forum: There's a little typo in TS-Soft's include-file. The correct definition is:
Code: Select all
zplay_GetStreamInfo(hZPlay, *pInfo.TStreamInfo)
zplay_GetStreamInfoW(hZPlay, *pInfo.TStreamInfoW)
PB 5.60 - Windows 10
Re: LibZPlay wrapper (updated)
Hi,
Thanks for the include correction.
Interesting. Which version of x86 PB are you using? It compiles fine here under Win8 x64 using PB 5.11.
Erion
Thanks for the include correction.
Interesting. Which version of x86 PB are you using? It compiles fine here under Win8 x64 using PB 5.11.
Erion
To see a world in a grain of sand,
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
Re: LibZPlay wrapper (updated)
I'm using x86-Version of PB 5.11 under Windows XP. Could it make the difference?
PB 5.60 - Windows 10
Re: LibZPlay wrapper (updated)
Hello,
LibZPlay should work under XP.
Just to be on the safe side, I assume you have everything in one directory, the dll, the include and the lib file.
If there is an example pb file in the libZPlay directory, could you try running that to see if you're having the linker error please?
Erion
LibZPlay should work under XP.
Just to be on the safe side, I assume you have everything in one directory, the dll, the include and the lib file.
If there is an example pb file in the libZPlay directory, could you try running that to see if you're having the linker error please?
Erion
To see a world in a grain of sand,
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
Re: LibZPlay wrapper (updated)
Hi Erion,
I coded a mp3-player with many, many libzplay-functions (thanks again to you guys who made this wonderful include). For example, I implemented: setting of tempo, setting of volume, seek position, display of vu-data, determination of the audio length. It all works perfect.
Then I tried to write some kind of recording device. And at that point I needed the functions you added into the include. First I thought that I've set the parameters in e. g. zplay_SetWaveOutFile() wrongfully. But than I discovered that also other newly added functions which are more simple (like zplay_EnumerateWaveIn()) cause this linker error as well. What I'm saying is: It's surely not an obvious mistake. As you said: you have no problems for example with zplay_EnumerateWaveIn(). I have no explanation, why the new functions in your include do not work on my system.
P.S.
All the examples of yours and TS-Soft work well
I coded a mp3-player with many, many libzplay-functions (thanks again to you guys who made this wonderful include). For example, I implemented: setting of tempo, setting of volume, seek position, display of vu-data, determination of the audio length. It all works perfect.
Then I tried to write some kind of recording device. And at that point I needed the functions you added into the include. First I thought that I've set the parameters in e. g. zplay_SetWaveOutFile() wrongfully. But than I discovered that also other newly added functions which are more simple (like zplay_EnumerateWaveIn()) cause this linker error as well. What I'm saying is: It's surely not an obvious mistake. As you said: you have no problems for example with zplay_EnumerateWaveIn(). I have no explanation, why the new functions in your include do not work on my system.
P.S.
All the examples of yours and TS-Soft work well
PB 5.60 - Windows 10
Re: LibZPlay wrapper (updated)
Hi,
I have a strong suspicion that the lib file for the dll was not up to date in the version on my site. I have fixed the include with the two lines you've pointed out, and also included the patent-free version.
Please redownload and see if this works.
Oh, and congrats for your mp3 player!
Erion
I have a strong suspicion that the lib file for the dll was not up to date in the version on my site. I have fixed the include with the two lines you've pointed out, and also included the patent-free version.
Please redownload and see if this works.
Oh, and congrats for your mp3 player!
Erion
To see a world in a grain of sand,
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
Re: LibZPlay wrapper (updated)
Hi, Erion, I'm very grateful for your support. I appreciate it very much. I'll try tomorrow due to the fact that it's one hour to midnight (I live in Berlin), but certainly I will give you a feedback. I have the strong feeling that a solution for my problem is near. Good night und til tomorrow! - Angelo
PB 5.60 - Windows 10
Re: LibZPlay wrapper (updated)
Hi, Erion!
Now all zplay-functions work without error!!!! You had the right suspicion: it was the libzplay.lib which caused trouble. Many thanks for the improved version!!
Now I can start to work on a recorder. By the way, do you have some experience in using libzplay for creating a recording software? Anyway, I'm looking forward to work on this - it'll be fun. - Angelo


Now I can start to work on a recorder. By the way, do you have some experience in using libzplay for creating a recording software? Anyway, I'm looking forward to work on this - it'll be fun. - Angelo
PB 5.60 - Windows 10
Re: LibZPlay wrapper (updated)
Hello,
You're welcome, I'm glad it worked!
Unfortunately I have no LibZPlay experience, but one can always learn
According to the help file the library has some limitations when it comes to enumerating/setting devices under Vista and higher. This may or may not be a problem for you!
Best of luck,
Erion
You're welcome, I'm glad it worked!
Unfortunately I have no LibZPlay experience, but one can always learn

According to the help file the library has some limitations when it comes to enumerating/setting devices under Vista and higher. This may or may not be a problem for you!
Best of luck,
Erion
To see a world in a grain of sand,
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
Re: LibZPlay wrapper (updated)
Hey, I've got a problem: if I call a zplay function from inside a procedure, I get an IMA when exiting the said procedure...
IMA should happen as soon as you press the "ok" button. (tested on pb5.11 32bit)
any help?
Code: Select all
EnableExplicit
XIncludeFile "libzplay.pbi"
Global hZPlay, File.s, Text.s
Define ID3.TID3Info
Procedure Test(File.s)
Protected ID3.TID3Info
If zplay_OpenFile(hZPlay, File, #sfAutodetect)
If zplay_LoadFileID3W(hZPlay, File,#sfAutodetect, #id3Version2, @ID3)
zplay_Play(hZPlay)
Text = "Title: " + id3\Title + #LF$
Text + "from album: " + id3\Album + #LF$
Text + "from year: " + id3\Year + #LF$ + #LF$
Text + "Press okay to stop music"
MessageRequester("Test libzplay", Text)
zplay_Close(hZPlay)
EndIf
EndIf
EndProcedure
File = OpenFileRequester("Please select a ogg-file", "*.*", "ogg-File|*.*", 0)
If File
hZPlay = CreateZPlay()
If hZPlay
Test(File)
EndIf
zplay_DestroyZPlay(hZPlay)
EndIf
any help?
Re: LibZPlay wrapper (updated)
Hello,
It seems that LibZPlay is unable to free a protected variable. I am not sure why this is happening, in theory it should work.
If you define ID3 as a global variable, the IMA does not happen.
Erion
It seems that LibZPlay is unable to free a protected variable. I am not sure why this is happening, in theory it should work.
If you define ID3 as a global variable, the IMA does not happen.
Erion
To see a world in a grain of sand,
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
- W. B.
Visit my site, also for PureBasic goodies http://erion.tdrealms.com