mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Refactor audio buffering API, this should mainly prevent SDL audio driver from allocating memory in the mixer callback.
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
#include "GpAudioDriverXAudio2.h"
|
||||
|
||||
#include "IGpLogDriver.h"
|
||||
#include "GpAudioBufferXAudio2.h"
|
||||
#include "GpAudioChannelXAudio2.h"
|
||||
#include "CoreDefs.h"
|
||||
|
||||
#include <xaudio2.h>
|
||||
#include <malloc.h>
|
||||
|
||||
void GpAudioDriverXAudio2::Shutdown()
|
||||
{
|
||||
@@ -96,6 +99,11 @@ GpAudioDriverXAudio2 *GpAudioDriverXAudio2::Create(const GpAudioDriverProperties
|
||||
return new GpAudioDriverXAudio2(properties, realSampleRate, xa, mv);
|
||||
}
|
||||
|
||||
IGpAudioBuffer *GpAudioDriverXAudio2::CreateBuffer(const void *buffer, size_t bufferSize)
|
||||
{
|
||||
return GpAudioBufferXAudio2::Create(buffer, bufferSize);
|
||||
}
|
||||
|
||||
IGpAudioChannel *GpAudioDriverXAudio2::CreateChannel()
|
||||
{
|
||||
return GpAudioChannelXAudio2::Create(this);
|
||||
|
||||
Reference in New Issue
Block a user