mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-11 19:14:22 +02:00
Update to v098r01 release.
byuu says: Changelog: - SFC: balanced profile removed - SFC: performance profile removed - SFC: code for handling non-threaded CPU, SMP, DSP, PPU removed - SFC: Coprocessor, Controller (and expansion port) shared Thread code merged to SFC::Cothread - Cothread here just means "Thread with CPU affinity" (couldn't think of a better name, sorry) - SFC: CPU now has vector<Thread*> coprocessors, peripherals; - this is the beginning of work to allow expansion port devices to be dynamically changed at run-time - ruby: all audio drivers default to 48000hz instead of 22050hz now if no frequency is assigned - note: the WASAPI driver can default to whatever the native frequency is; doesn't have to be 48000hz - tomoko: removed the ability to change the frequency from the UI (but it will display the frequency used) - tomoko: removed the timing settings panel - the goal is to work toward smooth video via adaptive sync - the model is broken by not being in control of the audio frequency anyway - it's further broken by PAL running at 50hz and WSC running at 75hz - it was always broken anyway by SNES interlace timing varying from progressive timing - higan: audio/ stub created (for now, it's just nall/dsp/ moved here and included as a header) - higan: video/ stub created - higan/GNUmakefile: now includes build rules for essential components (libco, emulator, audio, video) The audio changes are in preparation to merge wareya's awesome WASAPI work without the need for the nall/dsp resampler.
This commit is contained in:
@@ -19,7 +19,7 @@ struct AudioALSA : Audio {
|
||||
|
||||
struct {
|
||||
bool synchronize = false;
|
||||
unsigned frequency = 22050;
|
||||
unsigned frequency = 48000;
|
||||
unsigned latency = 60;
|
||||
} settings;
|
||||
|
||||
|
@@ -8,7 +8,7 @@ struct AudioAO : Audio {
|
||||
ao_device* audio_device = nullptr;
|
||||
|
||||
struct {
|
||||
unsigned frequency = 22050;
|
||||
unsigned frequency = 48000;
|
||||
} settings;
|
||||
|
||||
auto cap(const string& name) -> bool {
|
||||
|
@@ -24,7 +24,7 @@ struct AudioDS : Audio {
|
||||
struct {
|
||||
HWND handle = nullptr;
|
||||
bool synchronize = false;
|
||||
uint frequency = 22050;
|
||||
uint frequency = 48000;
|
||||
uint latency = 120;
|
||||
} settings;
|
||||
|
||||
|
@@ -26,7 +26,7 @@ struct AudioOpenAL : Audio {
|
||||
|
||||
struct {
|
||||
bool synchronize = true;
|
||||
unsigned frequency = 22050;
|
||||
unsigned frequency = 48000;
|
||||
unsigned latency = 40;
|
||||
} settings;
|
||||
|
||||
|
@@ -11,26 +11,26 @@
|
||||
//Failing that, one can disable OSS4 ioctl calls inside init() and remove the below defines
|
||||
|
||||
#ifndef SNDCTL_DSP_COOKEDMODE
|
||||
#define SNDCTL_DSP_COOKEDMODE _IOW('P', 30, signed)
|
||||
#define SNDCTL_DSP_COOKEDMODE _IOW('P', 30, int)
|
||||
#endif
|
||||
|
||||
#ifndef SNDCTL_DSP_POLICY
|
||||
#define SNDCTL_DSP_POLICY _IOW('P', 45, signed)
|
||||
#define SNDCTL_DSP_POLICY _IOW('P', 45, int)
|
||||
#endif
|
||||
|
||||
struct AudioOSS : Audio {
|
||||
~AudioOSS() { term(); }
|
||||
|
||||
struct {
|
||||
signed fd = -1;
|
||||
signed format = AFMT_S16_LE;
|
||||
signed channels = 2;
|
||||
int fd = -1;
|
||||
int format = AFMT_S16_LE;
|
||||
int channels = 2;
|
||||
} device;
|
||||
|
||||
struct {
|
||||
string device = "/dev/dsp";
|
||||
bool synchronize = true;
|
||||
unsigned frequency = 22050;
|
||||
uint frequency = 48000;
|
||||
} settings;
|
||||
|
||||
auto cap(const string& name) -> bool {
|
||||
@@ -60,8 +60,8 @@ struct AudioOSS : Audio {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(name == Audio::Frequency && value.is<unsigned>()) {
|
||||
settings.frequency = value.get<unsigned>();
|
||||
if(name == Audio::Frequency && value.is<uint>()) {
|
||||
settings.frequency = value.get<uint>();
|
||||
if(device.fd >= 0) init();
|
||||
return true;
|
||||
}
|
||||
@@ -84,14 +84,14 @@ struct AudioOSS : Audio {
|
||||
#if 1 //SOUND_VERSION >= 0x040000
|
||||
//attempt to enable OSS4-specific features regardless of version
|
||||
//OSS3 ioctl calls will silently fail, but sound will still work
|
||||
signed cooked = 1, policy = 4; //policy should be 0 - 10, lower = less latency, more CPU usage
|
||||
int cooked = 1, policy = 4; //policy should be 0 - 10, lower = less latency, more CPU usage
|
||||
ioctl(device.fd, SNDCTL_DSP_COOKEDMODE, &cooked);
|
||||
ioctl(device.fd, SNDCTL_DSP_POLICY, &policy);
|
||||
#endif
|
||||
signed freq = settings.frequency;
|
||||
int frequency = settings.frequency;
|
||||
ioctl(device.fd, SNDCTL_DSP_CHANNELS, &device.channels);
|
||||
ioctl(device.fd, SNDCTL_DSP_SETFMT, &device.format);
|
||||
ioctl(device.fd, SNDCTL_DSP_SPEED, &freq);
|
||||
ioctl(device.fd, SNDCTL_DSP_SPEED, &frequency);
|
||||
|
||||
updateSynchronization();
|
||||
return true;
|
||||
|
@@ -20,7 +20,7 @@ struct AudioPulseAudio : Audio {
|
||||
|
||||
struct {
|
||||
bool synchronize = false;
|
||||
unsigned frequency = 22050;
|
||||
unsigned frequency = 48000;
|
||||
unsigned latency = 60;
|
||||
} settings;
|
||||
|
||||
|
@@ -15,7 +15,7 @@ struct AudioPulseAudioSimple : Audio {
|
||||
} buffer;
|
||||
|
||||
struct {
|
||||
unsigned frequency = 22050;
|
||||
unsigned frequency = 48000;
|
||||
} settings;
|
||||
|
||||
auto cap(const string& name) -> bool {
|
||||
|
@@ -13,7 +13,7 @@ struct AudioWASAPI : Audio {
|
||||
struct {
|
||||
bool exclusive = false;
|
||||
bool synchronize = false;
|
||||
uint frequency = 44100;
|
||||
uint frequency = 48000;
|
||||
} settings;
|
||||
|
||||
auto cap(const string& name) -> bool {
|
||||
|
@@ -29,7 +29,7 @@ struct AudioXAudio2 : Audio, public IXAudio2VoiceCallback {
|
||||
|
||||
struct {
|
||||
bool synchronize = false;
|
||||
unsigned frequency = 22050;
|
||||
unsigned frequency = 48000;
|
||||
unsigned latency = 120;
|
||||
} settings;
|
||||
|
||||
|
Reference in New Issue
Block a user