I'm pretty sure some of this is very hacky and needs correcting, but it compiles at least.
This commit is contained in:
parent
53e16e0411
commit
429b8ceba2
|
@ -387,7 +387,7 @@ bool FAudio_Output::init(long sampleRate)
|
||||||
// create sound emitter
|
// create sound emitter
|
||||||
//This should be FAudio_CreateSourceVoice()
|
//This should be FAudio_CreateSourceVoice()
|
||||||
//hr = faud->CreateSourceVoice(&sVoice, &wfx, 0, 4.0f, ¬ify);
|
//hr = faud->CreateSourceVoice(&sVoice, &wfx, 0, 4.0f, ¬ify);
|
||||||
hr = FAudio_CreateSourceVoice(faud, &sVoice, (const FAudioWaveFormatEx*)&wfx, 0, 4.0f, ¬ify);
|
hr = FAudio_CreateSourceVoice(faud, &sVoice, (const FAudioWaveFormatEx*)&wfx, 0, 4.0f, ¬ify, NULL, NULL);
|
||||||
|
|
||||||
if (hr != S_OK) {
|
if (hr != S_OK) {
|
||||||
wxLogError(_("FAudio: Creating source voice failed!"));
|
wxLogError(_("FAudio: Creating source voice failed!"));
|
||||||
|
@ -561,7 +561,7 @@ void FAudio_Output::write(uint16_t* finalWave, int length)
|
||||||
buf.pAudioData = &buffers[currentBuffer * soundBufferLen];
|
buf.pAudioData = &buffers[currentBuffer * soundBufferLen];
|
||||||
currentBuffer++;
|
currentBuffer++;
|
||||||
currentBuffer %= (bufferCount + 1); // + 1 because we need one temporary buffer
|
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);
|
assert(hr == S_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue