I'm pretty sure some of this is very hacky and needs correcting, but it compiles at least.

This commit is contained in:
ZachBacon 2018-12-25 19:57:49 -05:00
parent 53e16e0411
commit 429b8ceba2
1 changed files with 2 additions and 2 deletions

View File

@ -387,7 +387,7 @@ bool FAudio_Output::init(long sampleRate)
// create sound emitter
//This should be FAudio_CreateSourceVoice()
//hr = faud->CreateSourceVoice(&sVoice, &wfx, 0, 4.0f, &notify);
hr = FAudio_CreateSourceVoice(faud, &sVoice, (const FAudioWaveFormatEx*)&wfx, 0, 4.0f, &notify);
hr = FAudio_CreateSourceVoice(faud, &sVoice, (const FAudioWaveFormatEx*)&wfx, 0, 4.0f, &notify, NULL, NULL);
if (hr != S_OK) {
wxLogError(_("FAudio: Creating source voice failed!"));
@ -561,7 +561,7 @@ void FAudio_Output::write(uint16_t* finalWave, int length)
buf.pAudioData = &buffers[currentBuffer * soundBufferLen];
currentBuffer++;
currentBuffer %= (bufferCount + 1); // + 1 because we need one temporary buffer
HRESULT hr = FAudioSourceVoice_SubmitSourceBuffer(sVoice, &buf); // send buffer to queue.
HRESULT hr = FAudioSourceVoice_SubmitSourceBuffer(sVoice, &buf, NULL); // send buffer to queue.
assert(hr == S_OK);
}