Library Update

Do you want to contribute to improving ZGameEditor? Check out the list of open activities and find out where you may be able to help!

Moderator: Moderators

User avatar
Site Admin
Posts: 1912
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden

Postby VilleK » Fri Feb 26, 2010 3:31 pm

I'll try to translate the example to ZGE:

Code: Select all

    DWORD chanins

Code: Select all

//ZExternalLibray definition
int BASSMOD_MusicGetVolume(int chaninds) { }

Code: Select all

int channels=0,instruments=0;
while (BASSMOD_MusicGetVolume(channels)!=-1) channels++;
while (BASSMOD_MusicGetVolume(0x00010000 | instruments)!=-1) instruments++;

Now channels holds the nr of channels, and instrument the nr of instruments.

Then to get the volume of the channels to an array called ChannelVolume:

Code: Select all

for(int i=0; i<channels; i++)
  ChannelVolume[i] = BASSMOD_MusicGetVolume(i)

And for instruments:

Code: Select all

for(int i=0; i<instruments; i++)
  InstrumentVolume[i] = BASSMOD_MusicGetVolume(0x00010000 | i)
Last edited by VilleK on Sat Feb 27, 2010 5:35 pm, edited 2 times in total.

User avatar
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada

Postby jph_wacheski » Sat Feb 27, 2010 5:13 pm

Thanks Ville,. I am starting to understand some of this. Unfortunatly the functions in the bassMOD version only seem to return the volume levels set with the setVolume functions, and not the actual audio levels. Drat! Oh well, still a good dll for simple playing of mod music with out any levels readings for interactivity,.. I will have to use the full ver. for what I was intending.

User avatar
Posts: 140
Joined: Thu Sep 11, 2008 7:53 pm
Location: GMT+1

Postby diki » Wed Mar 10, 2010 6:30 pm

there still seems to be a problem with the library (the .xml one with examples); the 'glsl fog' and 'viewfrustrum culling' examples don't cause any errors when added, but when trying to run the application, it crashes. moving their components out of their parent appstate and into the root events does not fix it... don't know the cause yet. the other examples work fine.

Return to “Open activities”

Who is online

Users browsing this forum: No registered users and 1 guest