You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Added some new methods to access audio data: channels, samples, etc... Also, added initial unit tests for the FFmpegReader class, including waveform checking against an actual audio file.
This commit is contained in:
@@ -243,6 +243,25 @@ void Frame::DisplayWaveform(bool resize)
|
||||
wave_image.display();
|
||||
}
|
||||
|
||||
// Get an array of sample data
|
||||
float* Frame::GetAudioSamples(int channel)
|
||||
{
|
||||
// return JUCE audio data for this channel
|
||||
return audio->getSampleData(channel);
|
||||
}
|
||||
|
||||
// Get number of audio channels
|
||||
int Frame::GetAudioChannelsCount()
|
||||
{
|
||||
return audio->getNumChannels();
|
||||
}
|
||||
|
||||
// Get number of audio samples
|
||||
int Frame::GetAudioSamplesCount()
|
||||
{
|
||||
return audio->getNumSamples();
|
||||
}
|
||||
|
||||
// Get pixel data (as packets)
|
||||
const Magick::PixelPacket* Frame::GetPixels()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user