Some minor windows changes
This commit is contained in:
parent
da154758e9
commit
a96ea1fcc1
@ -212,7 +212,7 @@ ssize_t AudioOutputSource::enqueue_samples_no_interleave(const void *buffer, siz
|
|||||||
auto samples_to_write{samples};
|
auto samples_to_write{samples};
|
||||||
if(samples_to_write > free_samples) samples_to_write = free_samples;
|
if(samples_to_write > free_samples) samples_to_write = free_samples;
|
||||||
const auto enqueued{samples_to_write};
|
const auto enqueued{samples_to_write};
|
||||||
{
|
{ //FIXME: This only works for two channels!
|
||||||
auto src_buffer = (const float*) buffer;
|
auto src_buffer = (const float*) buffer;
|
||||||
auto target_buffer = (float*) this->buffer.write_ptr();
|
auto target_buffer = (float*) this->buffer.write_ptr();
|
||||||
|
|
||||||
|
@ -80,8 +80,8 @@ bool Transfer::initialize(std::string &error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
u_long enabled = 0;
|
u_long enabled = 1;
|
||||||
auto non_block_rs = ioctlsocket(this->_socket, (long) FIONBIO, &enabled);
|
auto non_block_rs = ioctlsocket(this->_socket, FIONBIO, &enabled);
|
||||||
if (non_block_rs != NO_ERROR) {
|
if (non_block_rs != NO_ERROR) {
|
||||||
this->finalize(true, true);
|
this->finalize(true, true);
|
||||||
error = "failed to enable non blocking more";
|
error = "failed to enable non blocking more";
|
||||||
@ -100,6 +100,7 @@ bool Transfer::initialize(std::string &error) {
|
|||||||
|
|
||||||
bool Transfer::connect() {
|
bool Transfer::connect() {
|
||||||
int result = ::connect(this->_socket, reinterpret_cast<sockaddr *> (&this->remote_address), sizeof(this->remote_address));
|
int result = ::connect(this->_socket, reinterpret_cast<sockaddr *> (&this->remote_address), sizeof(this->remote_address));
|
||||||
|
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
auto error = WSAGetLastError();
|
auto error = WSAGetLastError();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user