Jump to content
Tuts 4 You

HVLPlay : A AHX/HVL playback library in C


mudlord

Recommended Posts

Posted (edited)

Hello,

Here's some stuff I have been mucking around with since WinAHX has a tendency to play some AHX tunes completely wrong. This lib is based on Xeron/IRIS's official code, straight from the official replayer and Winamp plugin sources. CPU usage of the library is very small too (around 0-4% on a E2200 dual core).

The lib is public domain and is built with MSVC6. Included is the source code as well as a usage example.

hvlplay.zip

Edited by mudlord
Posted

Updated the player.

* Commented the functions

* Added a "play from memory buffer" function. Now it should be a lot more useful.....

* Updated the example to show how to use the new play from memory feature, as well as added a example AHX tune by keito/alcatraz.

hvlplay_02.rar

  • 2 months later...
Posted
Updated the player.

* Commented the functions

* Added a "play from memory buffer" function. Now it should be a lot more useful.....

* Updated the example to show how to use the new play from memory feature, as well as added a example AHX tune by keito/alcatraz.

Great, will test it and Report!

Posted
Updated the player.

* Commented the functions

* Added a "play from memory buffer" function. Now it should be a lot more useful.....

* Updated the example to show how to use the new play from memory feature, as well as added a example AHX tune by keito/alcatraz.

Great, will test it and Report!

Works perfect with Purebasic!!

Well done Mudlord!!

Posted

Sorry...One Problem

Added the lib to an intro...

after i call the procedure "HVLPlay_PlayFile()" all actions after this call

will not be used, it seems Prog is waiting in this thread...

Maybe a Problem with:

WaitForSingleObject( hThread, INFINITE );

void HVLPlay_PlayFile()

{

hThread = CreateThread( NULL, 0, PlayThread, NULL,

0, &threadId );

WaitForSingleObject( hThread, INFINITE );

}

Cheers and Thanx...

Posted

I'm looking into rewriting the thing.

Anyone with MSVC can recompile it to fix that issue. Sorry bout that, I no longer have access to MSVC to recompile :(

Posted
I'm looking into rewriting the thing.

Anyone with MSVC can recompile it to fix that issue. Sorry bout that, I no longer have access to MSVC to recompile :(

Do yu know what to change, so ill intstall MSVC6 to change and recompile... ;)

Posted

Try removing WaitForSingleObject()

If that doesnt work, then the replayer thread needs a rewrite.....

Posted
Try removing WaitForSingleObject()

If that doesnt work, then the replayer thread needs a rewrite.....

Ok... here is new working Lib!!

now the thread is working properly!!

Cheers and thanx...

eNeRGy

hvlplay.rar

Posted (edited)

Aren't you the same dude from the DF Interactive demo development forums?

If so, its cool if you put it in the main AHX replayer thread there. Its about time a player that uses the official code is made :)

And thanks alot for the code fixes! Is it okay if you post the source code? Then other people may benefit (for instance people who use different compilers than MSVC)

Edited by mudlord
Posted
Aren't you the same dude from the DF Interactive demo development forums?

If so, its cool if you put it in the main AHX replayer thread there. Its about time a player that uses the official code is made :)

And thanks alot for the code fixes! Is it okay if you post the source code? Then other people may benefit (for instance people who use different compilers than MSVC)

Yes, it's me, eNeRGy/dAWN from DBF... :bomb:

So, ill send yu whole Source inclusive the Purebasic Userlib, so yu can update yur Player here and on DBF (if yu ve no account, ill do)

Cheers and Thanx....

;)

Posted

Thanks, got the new package and I cleaned out the things that aren't needed in the "c++" directory (like the NCB, precompiled header, plus other things that are created during compile, except the obj and the lib). I'll post it up on DBF when I can (already had a account from the time I posted a C++ plasma effect example for OpenGL)

Posted

Updated the lib again:

* Fixed threading issue (thanks to eNeRGy/dAWN)

* Added PureBasic bindings (thanks to eNeRGy/dAWN)

hvlplay_wip.zip

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...