mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-10-26 21:51:30 +01:00
Update to v094r28 release.
byuu says: This WIP substantially restructures the ruby API for the first time since that project started. It is my hope that with this restructuring, destruction of the ruby objects should now be deterministic, which should fix the crashing on closing the emulator on Linux. We'll see I guess ... either way, it removed two layers of wrappers from ruby, so it's a pretty nice code cleanup. It won't compile on Windows due to a few issues I didn't see until uploading the WIP, too lazy to upload another. But I fixed all the compilation issues locally, so it'll work on Windows again with the next WIP (unless I break something else.) (Kind of annoying that Linux defines glActiveTexture but Windows doesn't.)
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
#define SNDCTL_DSP_POLICY _IOW('P', 45, signed)
|
||||
#endif
|
||||
|
||||
namespace ruby {
|
||||
struct AudioOSS : Audio {
|
||||
~AudioOSS() { term(); }
|
||||
|
||||
struct pAudioOSS {
|
||||
struct {
|
||||
signed fd = -1;
|
||||
signed format = AFMT_S16_LE;
|
||||
@@ -33,10 +33,6 @@ struct pAudioOSS {
|
||||
unsigned frequency = 22050;
|
||||
} settings;
|
||||
|
||||
~pAudioOSS() {
|
||||
term();
|
||||
}
|
||||
|
||||
auto cap(const string& name) -> bool {
|
||||
if(name == Audio::Device) return true;
|
||||
if(name == Audio::Synchronize) return true;
|
||||
@@ -82,8 +78,6 @@ struct pAudioOSS {
|
||||
}
|
||||
|
||||
auto init() -> bool {
|
||||
term();
|
||||
|
||||
device.fd = open(settings.device, O_WRONLY, O_NONBLOCK);
|
||||
if(device.fd < 0) return false;
|
||||
|
||||
@@ -119,7 +113,3 @@ private:
|
||||
fcntl(device.fd, F_SETFL, flags);
|
||||
}
|
||||
};
|
||||
|
||||
DeclareAudio(OSS)
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user