Update to 20180729 release.

byuu wrote:

Sigh ...

asio.hpp needs #include <nall/windows/registry.hpp>

[Since the last WIP, byuu also posted the following message. -Ed.]

ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.

I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.

Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.

I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.

I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
This commit is contained in:
Tim Allen
2018-07-29 23:24:38 +10:00
parent 716c95f279
commit 5deba5cbc1
182 changed files with 1533 additions and 2674 deletions

View File

@@ -4,41 +4,29 @@ struct AudioAO : Audio {
AudioAO() { initialize(); }
~AudioAO() { terminate(); }
auto availableDevices() -> string_vector {
return {"Default"};
}
auto driver() -> string override { return "libao"; }
auto ready() -> bool override { return _ready; }
auto availableFrequencies() -> vector<double> {
auto hasFrequencies() -> bool override { return true; }
auto availableFrequencies() -> vector<double> override {
return {44100.0, 48000.0, 96000.0};
}
auto availableLatencies() -> vector<uint> {
return {100};
}
auto availableChannels() -> vector<uint> {
return {2};
}
auto ready() -> bool { return _ready; }
auto blocking() -> bool { return true; }
auto channels() -> uint { return 2; }
auto frequency() -> double { return _frequency; }
auto latency() -> uint { return 100; }
auto setFrequency(double frequency) -> bool {
if(_frequency == frequency) return true;
_frequency = frequency;
auto setFrequency(double frequency) -> bool override {
if(frequency == Audio::frequency()) return true;
if(!Audio::setFrequency(frequency)) return false;
return initialize();
}
auto output(const double samples[]) -> void {
auto output(const double samples[]) -> void override {
uint32_t sample = 0;
sample |= (uint16_t)sclamp<16>(samples[0] * 32767.0) << 0;
sample |= (uint16_t)sclamp<16>(samples[1] * 32767.0) << 16;
ao_play(_interface, (char*)&sample, 4);
}
private:
auto initialize() -> bool {
terminate();
@@ -56,10 +44,10 @@ struct AudioAO : Audio {
ao_info* information = ao_driver_info(driverID);
if(!information) return false;
_device = information->short_name;
string device = information->short_name;
ao_option* options = nullptr;
if(_device == "alsa") {
if(device == "alsa") {
ao_append_option(&options, "buffer_time", "100000"); //100ms latency (default was 500ms)
}
@@ -79,8 +67,6 @@ struct AudioAO : Audio {
}
bool _ready = false;
string _device = "Default";
double _frequency = 48000.0;
ao_device* _interface = nullptr;
};