- audioplayer: remove some code; since 2588700 it's to find in helpers.cpp|h

Signed-off-by: Thilo Graf <dbt@novatux.de>

this is a fix for: adding some curl helpers
This commit is contained in:
svenhoefer
2018-08-19 21:48:19 +02:00
committed by Thilo Graf
parent 153cce9d95
commit b0590ff20d

View File

@@ -115,40 +115,6 @@ void CAudiofileExt::operator=(const CAudiofileExt& src)
firstChar = src.firstChar; firstChar = src.firstChar;
} }
struct MemoryStruct
{
char *memory;
size_t size;
};
static void *myrealloc(void *ptr, size_t size)
{
/* There might be a realloc() out there that doesn't like reallocing
NULL pointers, so we take care of it here */
if (ptr)
return realloc(ptr, size);
else
return malloc(size);
}
static size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
{
size_t realsize = size * nmemb;
struct MemoryStruct *mem = (struct MemoryStruct *)data;
mem->memory = (char *)myrealloc(mem->memory, mem->size + realsize + 1);
if (mem->memory)
{
memmove(&(mem->memory[mem->size]), ptr, realsize);
mem->size += realsize;
mem->memory[mem->size] = 0;
}
return realsize;
}
// we borrow this from filebrowser
extern size_t CurlWriteToString(void *ptr, size_t size, size_t nmemb, void *data);
CAudioPlayerGui::CAudioPlayerGui(bool inetmode) CAudioPlayerGui::CAudioPlayerGui(bool inetmode)
{ {
m_frameBuffer = CFrameBuffer::getInstance(); m_frameBuffer = CFrameBuffer::getInstance();