mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
Removed SndioOut cruft
This commit is contained in:
parent
03e4c697f9
commit
789a289c2e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user