Message from C, C++ discussions

January 2020

— I don't know, can I contact some there if need any help?

— 

I have the source code of a C library that I'd like to use in my C program. What's the proper way of doing that?

— What build system are you using?

— Currently, none, and I do not want to go beyond GNU Make.

— Can you please show your makefile?

— I currently don't have one for this project.

— ¿?

— Do ypu know abput performance diff between OpenSSL and Crypto++ for AES 256 GCM?

— Why could malloc throw segfault?

— Or declaring a variable?

— Could it be because of some empty stream / pointer that leaks memory and then any memory operation creates random segfaults?

Message permanent page

— 

Pa_Initialize();

auto params = new PaStreamParameters;
params->device = Pa_GetDefaultOutputDevice();
params->channelCount = 2;
params->sampleFormat = paInt32;
params->suggestedLatency = Pa_GetDeviceInfo(params->device)->defaultLowOutputLatency;
params->hostApiSpecificStreamInfo = nullptr;

SNDFILE *snd_file = nullptr;
SF_INFO *sf_info = (SF_INFO*)malloc(sizeof(sf_info));
// SF_INFO *sf_info;
// ::memset(sf_info, 0, sizeof(sf_info));
snd_file = sf_open("../res/test.wav", SFM_READ, sf_info);

PaStream *stream;
Pa_OpenStream(&stream, nullptr, params, sf_info->samplerate, paFramesPerBufferUnspecified, paClipOff, stream_callback, nullptr);

Pa_StartStream(stream);

int sub_format = sf_info->format & SF_FORMAT_SUBMASK;
printf("%d", sf_info->format);

Message permanent page