Page 2 of 2

Posted: Fri Feb 26, 2010 3:31 pm
by VilleK
I'll try to translate the example to ZGE:

Code: Select all

DWORD WINAPI BASSMOD_MusicGetVolume(
    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)

Posted: Sat Feb 27, 2010 5:13 pm
by jph_wacheski
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.

Posted: Wed Mar 10, 2010 6:30 pm
by diki
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.