diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp index abd5a6a4a8..624f40c81b 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp @@ -54,8 +54,8 @@ void AudioFormatReaderSource::getNextAudioBlock (const AudioSourceChannelInfo& i if (looping) { - const int newStart = (int) (start % (int) reader->lengthInSamples); - const int newEnd = (int) ((start + info.numSamples) % (int) reader->lengthInSamples); + const int64 newStart = start % reader->lengthInSamples; + const int64 newEnd = (start + info.numSamples) % reader->lengthInSamples; if (newEnd > newStart) { @@ -64,7 +64,7 @@ void AudioFormatReaderSource::getNextAudioBlock (const AudioSourceChannelInfo& i } else { - const int endSamps = (int) reader->lengthInSamples - newStart; + const int64 endSamps = reader->lengthInSamples - newStart; reader->read (info.buffer, info.startSample, endSamps, newStart, true, true); diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h index 6b25f65e2e..80710ba2ca 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h @@ -93,12 +93,8 @@ private: int64 volatile nextPlayPos; bool volatile looping; - void readBufferSection (int start, int length, AudioSampleBuffer& buffer, int startSample); - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatReaderSource) }; - - #endif // __JUCE_AUDIOFORMATREADERSOURCE_JUCEHEADER__