mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Replaced all our internal use of the old AudioSampleBuffer name with AudioBuffer<float> (for which AudioSampleBuffer is just a typedef)
This commit is contained in:
parent
6b45923426
commit
aecb819985
67 changed files with 338 additions and 358 deletions
|
|
@ -44,7 +44,7 @@ SamplerSound::SamplerSound (const String& soundName,
|
|||
length = jmin ((int) source.lengthInSamples,
|
||||
(int) (maxSampleLengthSeconds * sourceSampleRate));
|
||||
|
||||
data = new AudioSampleBuffer (jmin (2, (int) source.numChannels), length + 4);
|
||||
data = new AudioBuffer<float> (jmin (2, (int) source.numChannels), length + 4);
|
||||
|
||||
source.read (data, 0, length + 4, 0, true, true);
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ void SamplerVoice::pitchWheelMoved (int /*newValue*/) {}
|
|||
void SamplerVoice::controllerMoved (int /*controllerNumber*/, int /*newValue*/) {}
|
||||
|
||||
//==============================================================================
|
||||
void SamplerVoice::renderNextBlock (AudioSampleBuffer& outputBuffer, int startSample, int numSamples)
|
||||
void SamplerVoice::renderNextBlock (AudioBuffer<float>& outputBuffer, int startSample, int numSamples)
|
||||
{
|
||||
if (auto* playingSound = static_cast<SamplerSound*> (getCurrentlyPlayingSound().get()))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
/** Returns the audio sample data.
|
||||
This could return nullptr if there was a problem loading the data.
|
||||
*/
|
||||
AudioSampleBuffer* getAudioData() const noexcept { return data; }
|
||||
AudioBuffer<float>* getAudioData() const noexcept { return data; }
|
||||
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -92,7 +92,7 @@ private:
|
|||
friend class SamplerVoice;
|
||||
|
||||
String name;
|
||||
ScopedPointer<AudioSampleBuffer> data;
|
||||
ScopedPointer<AudioBuffer<float>> data;
|
||||
double sourceSampleRate;
|
||||
BigInteger midiNotes;
|
||||
int length = 0, attackSamples = 0, releaseSamples = 0;
|
||||
|
|
@ -130,7 +130,7 @@ public:
|
|||
void pitchWheelMoved (int newValue) override;
|
||||
void controllerMoved (int controllerNumber, int newValue) override;
|
||||
|
||||
void renderNextBlock (AudioSampleBuffer&, int startSample, int numSamples) override;
|
||||
void renderNextBlock (AudioBuffer<float>&, int startSample, int numSamples) override;
|
||||
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue