mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-22 22:01:06 -06:00
make frontend-util audio module config-agnostic
This commit is contained in:
@ -22,9 +22,6 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "FrontendUtil.h"
|
||||
#include "Config.h"
|
||||
#include "qt_sdl/PlatformConfig.h" // FIXME!!!
|
||||
#include "Platform.h"
|
||||
|
||||
#include "NDS.h"
|
||||
|
||||
@ -63,14 +60,12 @@ int AudioOut_GetNumSamples(int outlen)
|
||||
return len_in;
|
||||
}
|
||||
|
||||
void AudioOut_Resample(s16* inbuf, int inlen, s16* outbuf, int outlen)
|
||||
void AudioOut_Resample(s16* inbuf, int inlen, s16* outbuf, int outlen, int volume)
|
||||
{
|
||||
float res_incr = inlen / (float)outlen;
|
||||
float res_timer = 0;
|
||||
int res_pos = 0;
|
||||
|
||||
int volume = Config::AudioVolume;
|
||||
|
||||
for (int i = 0; i < outlen; i++)
|
||||
{
|
||||
outbuf[i*2 ] = (inbuf[res_pos*2 ] * volume) >> 8;
|
||||
|
Reference in New Issue
Block a user