We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the tag 0.3.0, I have extracted this example and tried to run it :
#include <catch2/catch_all.hpp> #include <AmbisonicEncoder.h> #include <AmbisonicDecoder.h> // Just some demo code from https://github.com/videolabs/libspatialaudio TEST_CASE("libspatialaudio smoke test", "[libspatialaudio]") { float sinewave[512]; for(int ni = 0; ni < 512; ni++) sinewave[ni] = (float)sin((ni / 128.f) * (M_PI * 2)); // CBFormat as 1st order 3D, and 512 samples CBFormat myBFormat; // Ambisonic encoder, also 3rd order 3D CAmbisonicEncoder myEncoder; myEncoder.Configure(1, true, 0); // Set test signal's position in the soundfield PolarPoint position; position.fAzimuth = 0; position.fElevation = 0; position.fDistance = 5; myEncoder.SetPosition(position); myEncoder.Refresh(); // Encode test signal into BFormat buffer myEncoder.Process(sinewave, 512, &myBFormat); // Ambisonic decoder, also 1st order 3D, for a 5.0 setup CAmbisonicDecoder myDecoder; myDecoder.Configure(1, true, kAmblib_50, 5); // Allocate buffers for speaker feeds float** ppfSpeakerFeeds = new float*[5]; for(int niSpeaker = 0; niSpeaker < 5; niSpeaker++) ppfSpeakerFeeds[niSpeaker] = new float[512]; // Decode to get the speaker feeds myDecoder.Process(&myBFormat, 512, ppfSpeakerFeeds); // De-allocate speaker feed buffers for(int niSpeaker = 0; niSpeaker < 5; niSpeaker++) delete [] ppfSpeakerFeeds[niSpeaker]; delete [] ppfSpeakerFeeds; }
When I run this test, It segfaults. A gdb session tells me that it crashed here :
at _deps/libspatialaudio-src/source/AmbisonicEncoder.cpp:48 48 pfDst->m_ppfChannels[niChannel][niSample] = pfSrc[niSample] * m_pfCoeff[niChannel];
The text was updated successfully, but these errors were encountered:
Which pointer is NULL?
Sorry, something went wrong.
(gdb) p pfDst->m_ppfChannels $4 = std::unique_ptr<float *[]> = {get() = 0x0}
I have same issues when running example code. is there a lack of reserve the memory? can some help to fix the issue?
No branches or pull requests
Using the tag 0.3.0, I have extracted this example and tried to run it :
When I run this test, It segfaults. A gdb session tells me that it crashed here :
The text was updated successfully, but these errors were encountered: