Skip to content

Commit e0282e4

Browse files
committed
Tidied up some 64-bit issues.
1 parent 4788d15 commit e0282e4

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

IDZAQAudioPlayer/IDZAQAudioPlayer.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static void IDZPropertyListener(void* inUserData,
110110
if(inID == kAudioQueueProperty_IsRunning)
111111
{
112112
UInt32 isRunning = [pPlayer queryIsRunning];
113-
NSLog(@"isRunning = %lu", isRunning);
113+
NSLog(@"isRunning = %u", (unsigned int)isRunning);
114114
BOOL bDidFinish = (pPlayer.playing && !isRunning);
115115
pPlayer.playing = isRunning ? YES : NO;
116116
if(bDidFinish)
@@ -233,7 +233,7 @@ - (void)readBuffer:(AudioQueueBufferRef)buffer
233233
OSStatus status = AudioQueueEnqueueBuffer(mQueue, buffer, 0, 0);
234234
if(status != noErr)
235235
{
236-
NSLog(@"Error: %s status=%ld", __PRETTY_FUNCTION__, status);
236+
NSLog(@"Error: %s status=%d", __PRETTY_FUNCTION__, (int)status);
237237
}
238238
}
239239
else

IDZAQAudioPlayer/IDZAudioDecoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@
5959
* @param error if not nil will receive error information in case of an error.
6060
* @return YES if successful, NO if an error occurs.
6161
*/
62-
- (BOOL)seekToTime:(NSTimeInterval)timeInterval error:(NSError*)error;
62+
- (BOOL)seekToTime:(NSTimeInterval)timeInterval error:(NSError*__autoreleasing*)error;
6363

6464
@end

IDZAQAudioPlayer/IDZAudioPlayerViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ - (void)viewDidLoad
101101
[self.player prepareToPlay];
102102
// Fill in the labels that do not change
103103
self.durationLabel.text = [NSString stringWithFormat:@"%.02fs",self.player.duration];
104-
self.numberOfChannelsLabel.text = [NSString stringWithFormat:@"%d", self.player.numberOfChannels];
104+
self.numberOfChannelsLabel.text = [NSString stringWithFormat:@"%lu", (unsigned long)self.player.numberOfChannels];
105105
self.currentTimeSlider.minimumValue = 0.0f;
106106
self.currentTimeSlider.maximumValue = self.player.duration;
107107
[self updateDisplay];

IDZAQAudioPlayer/IDZOggVorbisFileDecoder.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ - (BOOL)readBuffer:(AudioQueueBufferRef)pBuffer
9090
int currentSection = -1;
9191

9292
/* See: http://xiph.org/vorbis/doc/vorbisfile/ov_read.html */
93-
long nTotalBytesRead = 0;
93+
UInt32 nTotalBytesRead = 0;
9494
long nBytesRead = 0;
9595
do
9696
{
9797
nBytesRead = ov_read(&mOggVorbisFile,
9898
(char*)pBuffer->mAudioData + nTotalBytesRead,
99-
pBuffer->mAudioDataBytesCapacity - nTotalBytesRead,
99+
(int)(pBuffer->mAudioDataBytesCapacity - nTotalBytesRead),
100100
bigEndian, wordSize,
101101
signedSamples, &currentSection);
102102
if(nBytesRead <= 0)

0 commit comments

Comments
 (0)