Maybe I’m missing it in the documentation – and a search on the forums turned up nothing.
Is there a way for me to specify sounds for playback on the WiiMote through Designer – or do we only have access to this through the API?
- Symbiotic asked 11 years ago
Currently there is no way to specify this in Designer. We don’t intend to add this feature at present, as there is no good way to decide which Wiimote an event should play on at design time – this will most likely depend on game state.
Daniel’s solution of using a user property is a good way to do this.
- Guest answered 11 years ago
Yes, the user property was easy for us to use as well, a simple ‘true’ flag indicating that the sound should play off the speaker. The game state has a record of which player to send it to, so the controller mask is selected at play-time.
I have one problem though – the sample code only appears to be in place for FModEx, not the Event System. I currently cannot get the event to return a Channel pointer to use and pass into the function. (It only returns a ChannelGroup with zero channels).
Do you have some sample code to actually select the speaker from an FMod::Event which is about to play?
Oops. still no sound.
Just to clarify:
int conrollerIndex = 0;
FMOD::Event* pInstance = NULL;
res = m_pSystem->getEventBySystemID(systemID, FMOD_EVENT_ERROR_ON_DISKACCESS, &pInstance );
res = pInstance->setPropertyByIndex(FMOD_EVENTPROPERTY_WII_CONTROLLERSPEAKER, &conrollerIndex, true);
res = pInstance->start();
This produces no sound (sound does play out the main speaker without the setPropery call). All return values are ok. It appears that the sound is active for a time before the finished callback hits. In the Wii Menu, the speaker volume is turned up to full and previews fine.
Can you think of anything I am still missing? Thanks –
Do you happen to have your events playing as software? You need to use hardware mixing for the controller speaker to work. This means making sure "Force software" is set to "No" in the Wave banks settings, and also no dsp effects are used. In the "Used" column of the Wave banks screent, make sure it says "HW".
It is recommended that Compression is set to GCADPCM.
Greetings – thanks for the hints… just checked the sound – it is currently registered in the wave bank as ‘HW_2D’.
The other wav settings are: 44khz, mono, GCADPCM
We are using the fmod_wii_reduced.a library, so all software funtions are disabled anyway. Tested with the regular fmod_wii.a library, but still no luck yet…
Any other hints?
Greetings – found the issue – things are working now!
I believe it came down to the exact init timing of the line:
First try: on sound init. silence. even if the controller already looks ‘on’.
Second try: before each call to an event start(). silence or cut-off sound, depending on length of sound. (it takes some time to enable).
Third try: placed inside WPADSetConnectCallback. This works best, just make sure some other task does not replace the callback.
Please login first to submit.