if I set volume straight on here without calling anything or using vars it works...
But we cant do that...
Code: Select all
JMP3::init();
pspAudioInit();
JMP3 * sfx = JMP3::mInstance;
if (sfx) sfx->pspSetSfxVol();
pspAudioSetChannelCallback(0, audioOutCallback_0, NULL);
pspAudioSetChannelCallback(1, audioOutCallback_1, NULL);
pspAudioSetChannelCallback(2, audioOutCallback_2, NULL);
}
Code: Select all
void JMP3::pspSetSfxVol() {
int i = 0;
for(i = 0;i<3;i++)
pspAudioSetVolume(i, m_sfxvolume, m_sfxvolume);
}
Code: Select all
void JSoundSystem::SetSfxVolume(int volume)
{
JMP3 * sfx = JMP3::mInstance;
if (sfx) sfx->setSfxVolume(volume);
}
Code: Select all
int JMP3::setSfxVolume(int volume) {
return (m_sfxvolume = volume);
}
Code: Select all
pspAudioInit();
pspAudioSetVolume(0, 0x4000, 0x4000);
pspAudioSetVolume(1, 0x4000, 0x4000);
pspAudioSetChannelCallback(0, audioOutCallback0, NULL);
pspAudioSetChannelCallback(1, audioOutCallback1, NULL);