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.
Dim exinfo As FMOD_CREATESOUNDEXINFO
Dim buffer As Single, sys As Long, soundhandle As Long, channel As Long
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
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 😕
- Anonymous asked 12 years ago
[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.
The declaration says I should use a single:
Public Declare Function FMOD_Channel_GetVolume Lib "fmodex.dll" (ByVal channel As Long, ByRef volume As Single) As FMOD_RESULT
So I cant really use an integer…
- Anonymous answered 12 years ago
Please login first to submit.