Hi
I am having an issue with this method.
the header for this is:
Using iOS 7.1 sdk and xcode 5.1
Any help is appreciated.
thanks
Z
I am having an issue with this method.
Code:
- initWithIn:(NSString *)inFile out:(NSString *)outFile{
self = [super init];
lastChord = nil;
DELTA = 256;
deltaDivide = 4;
inData= [[NSFileHandle fileHandleForReadingAtPath:inFile]availableData] ;
//[COLOR="Blue"]First problem above line is[/COLOR]: [COLOR="Red"]ARC Restrictions implicit conversion of an Objective c pointer to 'char*' is disallowed.[/COLOR]
inLength = [inData length]);//2nd issue [COLOR="red"]Bad receiver type 'char*'[/COLOR]
inData = [inData bytes];//3rd issue [COLOR="red"]Bad receiver type 'char*'[/COLOR]
pos = 0;
self->outFile = outFile;
track = [[NSMutableData alloc] init];
contents = [[NSMutableData alloc] init];
volume = 100;
return self;
}
Code:
#import <UIKit/UIKit.h>
@interface MidiViewController : UIViewController{
char *inData;
NSInteger inLength, pos;
NSString *outFile;
NSMutableData *track, *contents;
NSString *lastChord;
int DELTA, deltaDivide;
int stepOffset, lastOffset;
int volume, lastVolume;
}
- initWithIn:(NSString *)inFile out:(NSString *)outFile;
- (void) writeFile;
- (void) buildTrack;
- (void) writeVarTime:(int)value;
- (void) writeChord:(NSString *)chord atDelta:(int)delta;
- (void) closeLastChord:(int)delta;
- (void) appendNote:(int)note state:(BOOL)on;
@end
Any help is appreciated.
thanks
Z