Change a few places to use DESMUME_SAMPLE_RATE instead of hard-coding 44100.
This commit is contained in:
parent
6b8a1b979b
commit
443cef56be
|
@ -19,6 +19,20 @@
|
|||
#include <cstring>
|
||||
|
||||
#include "avout_flac.h"
|
||||
#include "SPU.h"
|
||||
|
||||
// Helper macros to convert numerics to strings
|
||||
#if defined(_MSC_VER)
|
||||
//re: http://72.14.203.104/search?q=cache:HG-okth5NGkJ:mail.python.org/pipermail/python-checkins/2002-November/030704.html+_msc_ver+compiler+version+string&hl=en&gl=us&ct=clnk&cd=5
|
||||
#define _Py_STRINGIZE(X) _Py_STRINGIZE1((X))
|
||||
#define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X
|
||||
#define _Py_STRINGIZE2(X) #X
|
||||
|
||||
#define TOSTRING(X) _Py_STRINGIZE(X) // Alias _Py_STRINGIZE so that we have a common macro name
|
||||
#else
|
||||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
#endif
|
||||
|
||||
AVOutFlac::AVOutFlac() {
|
||||
const char* const args[] = {
|
||||
|
@ -28,7 +42,7 @@ AVOutFlac::AVOutFlac() {
|
|||
"--endian=little",
|
||||
"--channels=2",
|
||||
"--bps=16",
|
||||
"--sample-rate=44100",
|
||||
"--sample-rate=" TOSTRING(DESMUME_SAMPLE_RATE),
|
||||
"--sign=signed",
|
||||
"--force-raw-format",
|
||||
"-",
|
||||
|
|
|
@ -99,7 +99,7 @@ int SNDSDLInit(int buffersize)
|
|||
if (SDL_InitSubSystem(SDL_INIT_AUDIO) != 0)
|
||||
return -1;
|
||||
|
||||
audiofmt.freq = 44100;
|
||||
audiofmt.freq = DESMUME_SAMPLE_RATE;
|
||||
audiofmt.format = AUDIO_S16SYS;
|
||||
audiofmt.channels = 2;
|
||||
audiofmt.samples = (audiofmt.freq / 60) * 2;
|
||||
|
|
Loading…
Reference in New Issue