-
Couldn't load subscription status.
- Fork 48
Open
Description
i want to use CAmbisonicBinauralizer::Process(), but when run code to "memcpy(ppfDst[0], m_pfScratchBufferA.data(), nSamples * sizeof(float));" it report error "Segmentation fault (core dumped)" .
i create a new file ,file name is test.c ,the code :
#include<stdio.h>
#include <stdlib.h>
#include <cstring>
int main()
{
float **result = (float **)malloc(sizeof(float)*20);
float test[5] = {0};
memcpy(result[0],test, 2*sizeof(float));
free(result);
return 1;
}
when i run this code by comand : g++ test.c -std=c++11 or c++03 or c++17 or c++20,it also report Segmentation fault.
so we should not use "memcpy(ppfDst[0], m_pfScratchBufferA.data(), nSamples * sizeof(float));" when ppfDst type is float **,is it right?
Metadata
Metadata
Assignees
Labels
No labels