|
1 | 1 | // |
2 | | -// Copyright (c) 2014 - 2021 Stephen F. Booth <[email protected]> |
| 2 | +// Copyright (c) 2014 - 2023 Stephen F. Booth <[email protected]> |
3 | 3 | // Part of https://github.com/sbooth/SFBAudioEngine |
4 | 4 | // MIT license |
5 | 5 | // |
@@ -526,7 +526,7 @@ bool ReadChunkIDAndDataSize(SFBInputSource *inputSource, uint32_t& chunkID, uint |
526 | 526 | return nullptr; |
527 | 527 | } |
528 | 528 |
|
529 | | - if(![inputSource seekToOffset:(offset + (NSInteger)localChunkDataSize) error:nil]) { |
| 529 | + if(![inputSource seekToOffset:(offset + static_cast<NSInteger>(localChunkDataSize)) error:nil]) { |
530 | 530 | os_log_error(gSFBDSDDecoderLog, "Error skipping chunk data"); |
531 | 531 | return nullptr; |
532 | 532 | } |
@@ -565,7 +565,7 @@ bool ReadChunkIDAndDataSize(SFBInputSource *inputSource, uint32_t& chunkID, uint |
565 | 565 | result->mDataOffset = offset; |
566 | 566 |
|
567 | 567 | // Skip the data |
568 | | - if(![inputSource seekToOffset:(offset + (NSInteger)chunkDataSize) error:nil]) { |
| 568 | + if(![inputSource seekToOffset:(offset + static_cast<NSInteger>(chunkDataSize)) error:nil]) { |
569 | 569 | os_log_error(gSFBDSDDecoderLog, "Error skipping chunk data"); |
570 | 570 | return nullptr; |
571 | 571 | } |
@@ -641,7 +641,7 @@ bool ReadChunkIDAndDataSize(SFBInputSource *inputSource, uint32_t& chunkID, uint |
641 | 641 | return nullptr; |
642 | 642 | } |
643 | 643 |
|
644 | | - if(![inputSource seekToOffset:(offset + (NSInteger)localChunkDataSize) error:nil]) { |
| 644 | + if(![inputSource seekToOffset:(offset + static_cast<NSInteger>(localChunkDataSize)) error:nil]) { |
645 | 645 | os_log_error(gSFBDSDDecoderLog, "Error skipping chunk data"); |
646 | 646 | return nullptr; |
647 | 647 | } |
@@ -795,7 +795,7 @@ - (BOOL)openReturningError:(NSError **)error |
795 | 795 | } |
796 | 796 |
|
797 | 797 | _audioOffset = soundDataChunk->mDataOffset; |
798 | | - _packetCount = (AVAudioFramePosition)(soundDataChunk->mDataSize - 12) / (kSFBBytesPerDSDPacketPerChannel * channelsChunk->mNumberChannels); |
| 798 | + _packetCount = static_cast<AVAudioFramePosition>(soundDataChunk->mDataSize - 12) / (kSFBBytesPerDSDPacketPerChannel * channelsChunk->mNumberChannels); |
799 | 799 |
|
800 | 800 | if(![_inputSource seekToOffset:_audioOffset error:error]) |
801 | 801 | return NO; |
|
0 commit comments