Compare commits
2 Commits
67bbb1e1b8
...
793bfcef16
Author | SHA1 | Date |
---|---|---|
Zach Bacon | 793bfcef16 | |
Zach Bacon | 4589291199 |
|
@ -191,15 +191,16 @@ public:
|
|||
} f_notifier;
|
||||
|
||||
// Synchronization Event
|
||||
namespace {
|
||||
class FAudio_BufferNotify : public FAudioVoiceCallback {
|
||||
public:
|
||||
void *hBufferEndEvent;
|
||||
|
||||
FAudio_BufferNotify()
|
||||
{
|
||||
hBufferEndEvent = NULL;
|
||||
hBufferEndEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
assert(hBufferEndEvent != NULL);
|
||||
hBufferEndEvent = nullptr;
|
||||
hBufferEndEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
|
||||
assert(hBufferEndEvent != nullptr);
|
||||
|
||||
OnBufferEnd = &FAudio_BufferNotify::StaticOnBufferEnd;
|
||||
OnVoiceProcessingPassStart = &FAudio_BufferNotify::StaticOnVoiceProcessingPassStart;
|
||||
|
@ -230,6 +231,7 @@ public:
|
|||
static void StaticOnLoopEnd(FAudioVoiceCallback* callback, void * pBufferContext) {}
|
||||
static void StaticOnVoiceError(FAudioVoiceCallback* callback, void * pBufferContext, uint32_t Error) {}
|
||||
};
|
||||
}
|
||||
|
||||
// Class Declaration
|
||||
class FAudio_Output
|
||||
|
@ -252,7 +254,7 @@ public:
|
|||
void device_change();
|
||||
|
||||
// Configuration Changes
|
||||
void setThrottle(unsigned short throttle);
|
||||
void setThrottle(unsigned short throttle_);
|
||||
|
||||
private:
|
||||
bool failed;
|
||||
|
@ -609,7 +611,7 @@ void FAudio_Output::setThrottle(unsigned short throttle_)
|
|||
if (throttle_ == 0)
|
||||
throttle_ = 100;
|
||||
|
||||
uint32_t hr = FAudioSourceVoice_SetFrequencyRatio(sVoice, (float)throttle_ / 100.0f, FAUDIO_MAX_FILTER_FREQUENCY);
|
||||
uint32_t hr = FAudioSourceVoice_SetFrequencyRatio(sVoice, (float)throttle_ / 100.0f, FAUDIO_COMMIT_NOW);
|
||||
assert(hr == 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue