Skip to content

Commit

Permalink
fix: add platform checks to pulseaudio2 library (#10)
Browse files Browse the repository at this point in the history
chore(deps): remove zlib-sync due to issues on Win32
types(pulseaudio2): make Context non-default
  • Loading branch information
RuzikNF committed Oct 9, 2020
1 parent 468e731 commit 22299a3
Show file tree
Hide file tree
Showing 6 changed files with 586 additions and 148 deletions.
9 changes: 6 additions & 3 deletions bindings.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
module.exports = exports = function (str) {
if (process.platform !== "linux") return;
switch (str) {
case "pulse.node": {
const result = require("./node_modules/pulseaudio2/build/Release/pulse.node");
result.path = "./node_modules/pulseaudio2/build/Release/pulse.node";
return result;
try {
const result = require("./node_modules/pulseaudio2/build/Release/pulse.node");
result.path = "./node_modules/pulseaudio2/build/Release/pulse.node";
return result;
} catch (e) { }
}
}
};
Loading

0 comments on commit 22299a3

Please sign in to comment.