mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-04 03:40:07 +00:00
Added RF64 support to WavAudioFormat. Extended some of the audio source classes to support 64-bit sample indices.
This commit is contained in:
parent
9770806e09
commit
8ade855f56
15 changed files with 562 additions and 350 deletions
|
|
@ -50,7 +50,7 @@ AudioFormatReaderSource::~AudioFormatReaderSource()
|
|||
delete reader;
|
||||
}
|
||||
|
||||
void AudioFormatReaderSource::setNextReadPosition (int newPosition)
|
||||
void AudioFormatReaderSource::setNextReadPosition (int64 newPosition)
|
||||
{
|
||||
nextPlayPos = newPosition;
|
||||
}
|
||||
|
|
@ -60,15 +60,15 @@ void AudioFormatReaderSource::setLooping (bool shouldLoop)
|
|||
looping = shouldLoop;
|
||||
}
|
||||
|
||||
int AudioFormatReaderSource::getNextReadPosition() const
|
||||
int64 AudioFormatReaderSource::getNextReadPosition() const
|
||||
{
|
||||
return (looping) ? (nextPlayPos % (int) reader->lengthInSamples)
|
||||
: nextPlayPos;
|
||||
return looping ? nextPlayPos % reader->lengthInSamples
|
||||
: nextPlayPos;
|
||||
}
|
||||
|
||||
int AudioFormatReaderSource::getTotalLength() const
|
||||
int64 AudioFormatReaderSource::getTotalLength() const
|
||||
{
|
||||
return (int) reader->lengthInSamples;
|
||||
return reader->lengthInSamples;
|
||||
}
|
||||
|
||||
void AudioFormatReaderSource::prepareToPlay (int /*samplesPerBlockExpected*/,
|
||||
|
|
@ -84,7 +84,7 @@ void AudioFormatReaderSource::getNextAudioBlock (const AudioSourceChannelInfo& i
|
|||
{
|
||||
if (info.numSamples > 0)
|
||||
{
|
||||
const int start = nextPlayPos;
|
||||
const int64 start = nextPlayPos;
|
||||
|
||||
if (looping)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue