Route the wiimote speaker to the sound mixer (the host system's speakers). Emulated Wiimote speaker sounds will go to the host system's speakers. Real Wiimotes will continue to use their own speaker for Wiimote speaker sounds. All Wiimote speaker sound can be disabled by unchecking the "Enable Speaker Data" option.

Each emulated Wiimote can have its speaker routed from left to right via the "Speaker Pan" setting in the emulated wiimote settings dialog.  Use any value from -127 for leftmost to 127 for rightmost with 0 being the centre.

Added code in the InputConfig to use a spin control for non-boolean values.

Defaulted the setting of "Enable Speaker Data" to disabled.
This commit is contained in:
skidau
2014-09-06 01:23:54 +10:00
parent 3caab10df8
commit 8abe9622fd
6 changed files with 38 additions and 24 deletions

View File

@ -168,7 +168,7 @@ void CMixer::PushStreamingSamples(const short *samples, unsigned int num_samples
m_streaming_mixer.PushSamples(samples, num_samples);
}
void CMixer::PushWiimoteSpeakerSamples(const short *samples, unsigned int num_samples, unsigned int sample_rate, const u8 wiimote_index)
void CMixer::PushWiimoteSpeakerSamples(const short *samples, unsigned int num_samples, unsigned int sample_rate)
{
short samples_stereo[MAX_SAMPLES * 2];
@ -178,15 +178,8 @@ void CMixer::PushWiimoteSpeakerSamples(const short *samples, unsigned int num_sa
for (unsigned int i = 0; i < num_samples; ++i)
{
// Position the Wiimotes as follow
// Wiimote 0 = Center
// Wiimote 1 = Left
// Wiimote 2 = Right
// Wiimote 3 = Center
if (wiimote_index != 2)
samples_stereo[i * 2] = Common::swap16(samples[i]);
if (wiimote_index != 1)
samples_stereo[i * 2 + 1] = Common::swap16(samples[i]);
samples_stereo[i * 2] = Common::swap16(samples[i]);
samples_stereo[i * 2 + 1] = Common::swap16(samples[i]);
}
m_wiimote_speaker_mixer.PushSamples(samples_stereo, num_samples);