Update to v106r55 release.

byuu says:

Everything *should* be working again, but of course that won't
actually be the case. Here's where things stand:

  - bsnes, higan, icarus, and genius compile and run fine on FreeBSD
    with GTK
  - ruby video and audio drivers are untested on Windows, macOS, and
    Linux
  - hiro is untested on macOS
  - bsnes' status bar is not showing up properly with hiro/qt
  - bsnes and higan's about screen is not showing up properly with
    hiro/qt (1x1 window size)
  - bsnes on Windows crashes often when saving states, and I'm not sure
    why ... it happens inside Encode::RLE
  - bsnes on Windows crashes with ruby.input.windows (unsure why)
  - bsnes on Windows fails to show the verified emblem on the status bar
    properly
  - hiro on Windows flickers when changing tabs

To build the Windows bsnes and higan ports, use

    ruby="video.gdi audio.directsound"

Compilation error logs for Linux will help me fix the inevitable list of
typos there. I can fix the typos on other platforms, I just haven't
gotten to it yet.
This commit is contained in:
Tim Allen
2018-08-05 19:00:15 +10:00
parent 552d385031
commit 5da4532771
117 changed files with 1316 additions and 2383 deletions

View File

@@ -1,41 +1,32 @@
#include <pulse/pulseaudio.h>
struct AudioPulseAudio : Audio {
AudioPulseAudio() { initialize(); }
AudioPulseAudio& self = *this;
AudioPulseAudio(Audio& super) : AudioDriver(super) {}
~AudioPulseAudio() { terminate(); }
auto create() -> bool override {
super.setFrequency(48000);
super.setLatency(40);
return initialize();
}
auto driver() -> string override { return "PulseAudio"; }
auto ready() -> bool override { return _ready; }
auto hasBlocking() -> bool override { return true; }
auto hasFrequency() -> bool override { return true; }
auto hasLatency() -> bool override { return true; }
auto availableFrequencies() -> vector<double> override {
return {44100.0, 48000.0, 96000.0};
auto hasFrequencies() -> vector<uint> override {
return {44100, 48000, 96000};
}
auto availableLatencies() -> vector<uint> override {
auto hasLatencies() -> vector<uint> override {
return {20, 40, 60, 80, 100};
}
auto setBlocking(bool blocking) -> bool override {
if(blocking == Audio::blocking()) return true;
if(!Audio::setBlocking(blocking)) return false;
return true;
}
auto setFrequency(double frequency) -> bool override {
if(frequency == Audio::frequency()) return true;
if(!Audio::setFrequency(frequency)) return false;
return initialize();
}
auto setLatency(uint latency) -> bool override {
if(latency == Audio::latency()) return true;
if(!Audio::setLatency(latency)) return false;
return initialize();
}
auto setBlocking(bool blocking) -> bool override { return true; }
auto setFrequency(double frequency) -> bool override { return initialize(); }
auto setLatency(uint latency) -> bool override { return initialize(); }
auto output(const double samples[]) -> void override {
pa_stream_begin_write(_stream, (void**)&_buffer, &_period);
@@ -80,12 +71,12 @@ private:
_specification.format = PA_SAMPLE_S16LE;
_specification.channels = 2;
_specification.rate = (uint)_frequency;
_specification.rate = self.frequency;
_stream = pa_stream_new(_context, "audio", &_specification, nullptr);
pa_buffer_attr bufferAttributes;
bufferAttributes.maxlength = -1;
bufferAttributes.tlength = pa_usec_to_bytes(_latency * PA_USEC_PER_MSEC, &_specification);
bufferAttributes.tlength = pa_usec_to_bytes(self.latency * PA_USEC_PER_MSEC, &_specification);
bufferAttributes.prebuf = -1;
bufferAttributes.minreq = -1;
bufferAttributes.fragsize = -1;