Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (34 sloc) 963 Bytes
//
// UKSound.h
// MobileMoose
//
// Created by Uli Kusterer on 14.07.08.
// Copyright 2008 The Void Software. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <AudioToolbox/AudioToolbox.h>
#define kNumberBuffers 2
@class UKSound;
@protocol UKSoundDelegate
@optional
-(void) sound: (UKSound*)sender didFinishPlaying: (BOOL)state;
@end
@interface UKSound : NSObject
{
AudioFileID mAudioFile;
AudioStreamBasicDescription mDataFormat;
AudioQueueRef mQueue;
AudioQueueBufferRef mBuffers[kNumberBuffers];
UInt64 mPacketIndex;
UInt32 mNumPacketsToRead;
AudioStreamPacketDescription * mPacketDescs;
BOOL mDone;
id<UKSoundDelegate> delegate;
int maxBufferSizeBytes;
}
@property (assign) id<UKSoundDelegate> delegate;
-(id) initWithContentsOfURL: (NSURL*)theURL;
-(void) play;
// private:
-(void) audioQueue: (AudioQueueRef)inAQ processBuffer: (AudioQueueBufferRef)inCompleteAQBuffer;
@end
Something went wrong with that request. Please try again.