Removing nested OMP processing from FrameMapper. Adding lock inside time mapping (to prevent crashes when speeding up/slowing down clips). Adding omp critial lock to Frame GetAudioChannelsCount() and GetAudioSamplesCount() methods.

This commit is contained in:
Jonathan Thomas
2017-06-22 15:26:40 -05:00
parent 078c3f74dd
commit a322411669
3 changed files with 181 additions and 189 deletions

View File

@@ -410,13 +410,19 @@ float* Frame::GetInterleavedAudioSamples(int new_sample_rate, AudioResampler* re
// Get number of audio channels
int Frame::GetAudioChannelsCount()
{
return audio->getNumChannels();
int i;
#pragma omp critical
i = audio->getNumChannels();
return i;
}
// Get number of audio samples
int Frame::GetAudioSamplesCount()
{
return audio->getNumSamples();
int i;
#pragma omp critical
i = audio->getNumSamples();
return i;
}
juce::AudioSampleBuffer *Frame::GetAudioSampleBuffer()