Removed SndioOut cruft

This commit is contained in:
casey langen 2019-01-01 21:55:05 -08:00
parent 03e4c697f9
commit 789a289c2e

View File

@ -39,8 +39,6 @@
#include <math.h>
#include <limits.h>
#include <iostream>
#include <unistd.h>
#include <poll.h>
#define BUFFER_COUNT 16
#define ERROR(str) std::cerr << "SndioOut Error: " << str << "\n";
@ -98,28 +96,6 @@ extern "C" void SetPreferences(musik::core::sdk::IPreferences* prefs) {
}
}
static bool waitForDevice(sio_hdl* hdl) {
INFO("waiting for device")
int nfds, revents;
struct pollfd pfds[1];
do {
nfds = sio_pollfd(hdl, pfds, POLLOUT);
if (nfds > 0) {
if (poll(pfds, nfds, -1) < 0) {
INFO("poll failed");
return false;
}
}
revents = sio_revents(hdl, pfds);
if (revents & POLLHUP) {
INFO("device disappeared");
return false;
}
} while (!(revents & POLLOUT));
INFO("done waiting for device")
return true;
}
SndioOut::SndioOut() {
INFO("---------- sndout.ctor ----------")
this->volume = 1.0f;