mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
Removed a couple of suprious int casts in AudioFormatReaderSource
This commit is contained in:
parent
aec3d12753
commit
fdca8fe1c0
2 changed files with 3 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue