mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-25 02:04:23 +00:00
Added the AudioData class, which contains a range of templated structrures for manipulating different sample type primitives. This will replace the old AudioDataConverters class, and I've refactored a lot of the audio devices and formats to use the new classes.
This commit is contained in:
parent
8f4aaa4873
commit
ba62157841
27 changed files with 1603 additions and 2510 deletions
|
|
@ -2378,11 +2378,16 @@ bool AudioCDBurner::addAudioTrack (AudioSource* audioSource, int numSamples)
|
|||
|
||||
zeromem (buffer, bytesPerBlock);
|
||||
|
||||
AudioDataConverters::convertFloatToInt16LE (sourceBuffer.getSampleData (0, 0),
|
||||
buffer, samplesPerBlock, 4);
|
||||
typedef AudioData::Pointer <AudioData::Int16, AudioData::LittleEndian,
|
||||
AudioData::Interleaved, AudioData::NonConst> CDSampleFormat;
|
||||
|
||||
AudioDataConverters::convertFloatToInt16LE (sourceBuffer.getSampleData (1, 0),
|
||||
buffer + 2, samplesPerBlock, 4);
|
||||
typedef AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian,
|
||||
AudioData::NonInterleaved, AudioData::Const> SourceSampleFormat;
|
||||
|
||||
CDSampleFormat left (buffer, 2);
|
||||
left.convertSamples (SourceSampleFormat (sourceBuffer.getSampleData (0)), samplesPerBlock);
|
||||
CDSampleFormat right (buffer + 2, 2);
|
||||
right.convertSamples (SourceSampleFormat (sourceBuffer.getSampleData (1)), samplesPerBlock);
|
||||
|
||||
hr = pimpl->redbook->AddAudioTrackBlocks (buffer, bytesPerBlock);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue