Skip to content

Commit

Permalink
I'm pretty sure some of this is very hacky and needs correcting, but …
Browse files Browse the repository at this point in the history
…it compiles at least.
  • Loading branch information
ZachBacon committed Dec 26, 2018
1 parent 53e16e0 commit 429b8ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wx/faudio.cpp
Expand Up @@ -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!"));
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 429b8ce

Please sign in to comment.