mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 04:41:39 +00:00
Use guest audio configuration values in embedded player.
This commit is contained in:
parent
2ecdf59772
commit
ad4468fc09
1 changed files with 4 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
#include <miniaudio.h>
|
#include <miniaudio.h>
|
||||||
|
|
||||||
|
#include <apu/audio.h>
|
||||||
#include <apu/embedded_player.h>
|
#include <apu/embedded_player.h>
|
||||||
#include <user/config.h>
|
#include <user/config.h>
|
||||||
|
|
||||||
|
|
@ -134,6 +135,9 @@ static void PlayEmbeddedSound(EmbeddedSound s)
|
||||||
void EmbeddedPlayer::Init()
|
void EmbeddedPlayer::Init()
|
||||||
{
|
{
|
||||||
ma_engine_config engineConfig = ma_engine_config_init();
|
ma_engine_config engineConfig = ma_engine_config_init();
|
||||||
|
engineConfig.channels = XAUDIO_NUM_CHANNELS;
|
||||||
|
engineConfig.sampleRate = XAUDIO_SAMPLES_HZ;
|
||||||
|
|
||||||
ma_result res = ma_engine_init(&engineConfig, &g_audioEngine);
|
ma_result res = ma_engine_init(&engineConfig, &g_audioEngine);
|
||||||
if (res == MA_SUCCESS)
|
if (res == MA_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue