Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
changsanjiang committed Apr 24, 2021
1 parent 33a5584 commit a97655c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion SJAudioPlayer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/changsanjiang/SJAudioPlayer'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'changsanjiang@gmail.com' => 'changsanjiang@gmail.com' }
s.author = { 'changsanjiang' => 'changsanjiang@gmail.com' }
s.source = { :git => 'https://github.com/changsanjiang/SJAudioPlayer.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ - (nullable AVAudioPCMBuffer *)convertPackets:(NSArray<id<APAudioContentPacket>>
}

AVAudioFrameCount nAllFrames = (AVAudioFrameCount)(_streamFormat.streamDescription->mFramesPerPacket * packets.count);
AVAudioPacketCount nAllPackets = (AVAudioPacketCount)(nAllFrames / _outputFormat.streamDescription->mFramesPerPacket);
UInt32 nAllPackets = (AVAudioPacketCount)(nAllFrames / _outputFormat.streamDescription->mFramesPerPacket);
AVAudioPCMBuffer *buffer = [AVAudioPCMBuffer.alloc initWithPCMFormat:_outputFormat frameCapacity:nAllFrames];
if ( buffer == nil ) {
if ( error != NULL ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ - (nullable NSData *)readDataAtOffset:(UInt64)offset capacity:(UInt64)capacity e
return NSData.data;

@try {
NSData *data = [_reader readDataOfLength:length];
NSData *data = [_reader readDataOfLength:(NSUInteger)length];
return data;
} @catch (NSException *exception) {
if ( error != NULL ) {
Expand Down Expand Up @@ -525,10 +525,10 @@ - (void)seekToOffset:(UInt64)offset {
// 距离offset最近的file(前面的)
APAudioContentFile *pre = nil;
while ( cur != nil ) {
NSRange range = NSMakeRange(cur.offset, cur.length);
NSRange range = NSMakeRange((NSUInteger)cur.offset, (NSUInteger)cur.length);
if ( cur.offset == offset )
break;
if ( NSLocationInRange(offset, range) )
if ( NSLocationInRange((NSUInteger)offset, range) )
break;
if ( cur.offset <= offset )
pre = cur;
Expand Down

0 comments on commit a97655c

Please sign in to comment.