|
|
@@ -7315,21 +7315,20 @@ static void initWin32Sockets() |
|
|
|
|
|
|
|
static bool resetSocketOptions (const int handle, const bool isDatagram) throw() |
|
|
|
{ |
|
|
|
if (handle <= 0) |
|
|
|
return false; |
|
|
|
|
|
|
|
const int sndBufSize = 65536; |
|
|
|
const int rcvBufSize = 65536; |
|
|
|
const int one = 1; |
|
|
|
|
|
|
|
return setsockopt (handle, SOL_SOCKET, SO_RCVBUF, (const char*) &rcvBufSize, sizeof (int)) == 0 |
|
|
|
&& setsockopt (handle, SOL_SOCKET, SO_SNDBUF, (const char*) &sndBufSize, sizeof (int)) == 0 |
|
|
|
&& (isDatagram || (setsockopt (handle, IPPROTO_TCP, TCP_NODELAY, (const char*) &one, sizeof (int)) == 0)); |
|
|
|
return handle > 0 |
|
|
|
&& setsockopt (handle, SOL_SOCKET, SO_RCVBUF, (const char*) &rcvBufSize, sizeof (rcvBufSize)) == 0 |
|
|
|
&& setsockopt (handle, SOL_SOCKET, SO_SNDBUF, (const char*) &sndBufSize, sizeof (sndBufSize)) == 0 |
|
|
|
&& (isDatagram ? (setsockopt (handle, SOL_SOCKET, SO_BROADCAST, (const char*) &one, sizeof (one)) == 0) |
|
|
|
: (setsockopt (handle, IPPROTO_TCP, TCP_NODELAY, (const char*) &one, sizeof (one)) == 0)); |
|
|
|
} |
|
|
|
|
|
|
|
static bool bindSocketToPort (const int handle, const int port) throw() |
|
|
|
{ |
|
|
|
if (handle == 0 || port <= 0) |
|
|
|
if (handle <= 0 || port <= 0) |
|
|
|
return false; |
|
|
|
|
|
|
|
struct sockaddr_in servTmpAddr; |
|
|
@@ -11590,6 +11589,9 @@ const String String::replaceSection (int index, |
|
|
|
const int newStringLen = (stringToInsert != 0) ? CharacterFunctions::length (stringToInsert) : 0; |
|
|
|
const int newTotalLen = len + newStringLen - numCharsToReplace; |
|
|
|
|
|
|
|
if (newTotalLen <= 0) |
|
|
|
return String::empty; |
|
|
|
|
|
|
|
String result (newTotalLen, (int) 0); |
|
|
|
|
|
|
|
memcpy (result.text->text, |
|
|
@@ -259976,9 +259978,8 @@ void AudioCDReader::refreshTrackLengths() |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
bool AudioCDReader::read (int** destSamples, |
|
|
|
int64 startSampleInFile, |
|
|
|
int numSamples) |
|
|
|
bool AudioCDReader::readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, |
|
|
|
int64 startSampleInFile, int numSamples) |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
|