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