0
0

okay..I’m probably doing something very stupid. if I use fmod_channel_getvolume it ALWAYS returns 1, and fmod_channel_setvolume doesn’t work either. I’m using the last version of fmodex in visual basic.

some code:
[code:3nm15ea7]
Dim exinfo As FMOD_CREATESOUNDEXINFO
Dim buffer As Single, sys As Long, soundhandle As Long, channel As Long
FMOD_System_Create sys
FMOD_System_Init sys, 1, FMOD_INIT_NORMAL, 0
FMOD_System_CreateSound sys, "c:\test.mp3", (FMOD_2D Or FMOD_SOFTWARE Or FMOD_CREATESTREAM), exinfo, soundhandle
channel = FMOD_CHANNEL_FREE
fmodex.FMOD_System_PlaySound sys, channel, soundhandle, 0, channel
fmodex.FMOD_Channel_GetVolume channel, buffer
[/code:3nm15ea7]
buffer would now contain 1…

this is basically what my full program needs to do. somehow this sample doesn’t even play but whatever, that’s not the problem… my other program does ๐Ÿ˜•

  • You must to post comments
0
0

The declaration says I should use a single:

[code:lce6niyy]
Public Declare Function FMOD_Channel_GetVolume Lib "fmodex.dll" (ByVal channel As Long, ByRef volume As Single) As FMOD_RESULT
[/code:lce6niyy]

So I cant really use an integer…

  • You must to post comments
0
0

so just change the declaration, its wrong ๐Ÿ˜€

  • You must to post comments
0
0

[quote:3fsfys6r]buffer would now contain 1… [/quote:3fsfys6r]
well that is correct, since that is what the volume starts off as.

There isn’t a setvolume in the code you posted so I can’t tell you why that isn’t working but everything is fine this end.

Also, are you using the latest version of fmodex? The vb interface in that has been updated so you don’t have to pass exinfo into CreateSound.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.