mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 10:31:02 +00:00
replaced all printf with NSLog
This commit is contained in:
@@ -86,7 +86,7 @@ static NSData* p12 = nil;
|
||||
BIO_free(bio);
|
||||
|
||||
if (!x509) {
|
||||
fprintf(stderr, "unable to parse certificate in memory\n");
|
||||
NSLog(@"ERROR: unable to parse certificate in memory");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ static NSData* p12 = nil;
|
||||
BIO_free(bio);
|
||||
|
||||
if (!pkey) {
|
||||
fprintf(stderr, "unable to parse private key in memory\n");
|
||||
NSLog(@"ERROR: unable to parse private key in memory!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ static NSData* p12 = nil;
|
||||
x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
|
||||
|
||||
if (!x509) {
|
||||
fprintf(stderr, "unable to parse certificate in memory\n");
|
||||
NSLog(@"ERROR: unable to parse certificate in memory!");
|
||||
return NULL;
|
||||
}
|
||||
return [NSData dataWithBytes:x509->signature->data length:x509->signature->length];
|
||||
|
||||
@@ -108,7 +108,7 @@ void ArInit(void)
|
||||
status = AudioComponentInstanceNew(AudioComponentFindNext(NULL, &audioDesc), &audioUnit);
|
||||
|
||||
if (status) {
|
||||
printf("Unable to instantiate new AudioComponent: %d\n", (int32_t)status);
|
||||
NSLog(@"Unable to instantiate new AudioComponent: %d", (int32_t)status);
|
||||
}
|
||||
|
||||
AudioStreamBasicDescription audioFormat = {0};
|
||||
@@ -129,7 +129,7 @@ void ArInit(void)
|
||||
&audioFormat,
|
||||
sizeof(audioFormat));
|
||||
if (status) {
|
||||
printf("Unable to set audio unit to input: %d\n", (int32_t)status);
|
||||
NSLog(@"Unable to set audio unit to input: %d", (int32_t)status);
|
||||
}
|
||||
|
||||
AURenderCallbackStruct callbackStruct = {0};
|
||||
@@ -143,12 +143,12 @@ void ArInit(void)
|
||||
&callbackStruct,
|
||||
sizeof(callbackStruct));
|
||||
if (status) {
|
||||
printf("Unable to set audio unit callback: %d\n", (int32_t)status);
|
||||
NSLog(@"Unable to set audio unit callback: %d", (int32_t)status);
|
||||
}
|
||||
|
||||
status = AudioUnitInitialize(audioUnit);
|
||||
if (status) {
|
||||
printf("Unable to initialize audioUnit: %d\n", (int32_t)status);
|
||||
NSLog(@"Unable to initialize audioUnit: %d", (int32_t)status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ void ArRelease(void)
|
||||
|
||||
OSStatus status = AudioUnitUninitialize(audioUnit);
|
||||
if (status) {
|
||||
printf("Unable to uninitialize audioUnit: %d\n", (int32_t)status);
|
||||
NSLog(@"Unable to uninitialize audioUnit: %d", (int32_t)status);
|
||||
}
|
||||
|
||||
// Audio session is now inactive
|
||||
@@ -183,7 +183,7 @@ void ArStart(void)
|
||||
{
|
||||
OSStatus status = AudioOutputUnitStart(audioUnit);
|
||||
if (status) {
|
||||
printf("Unable to start audioUnit: %d\n", (int32_t)status);
|
||||
NSLog(@"Unable to start audioUnit: %d", (int32_t)status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ void ArStop(void)
|
||||
{
|
||||
OSStatus status = AudioOutputUnitStop(audioUnit);
|
||||
if (status) {
|
||||
printf("Unable to stop audioUnit: %d\n", (int32_t)status);
|
||||
NSLog(@"Unable to stop audioUnit: %d", (int32_t)status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ void ArDecodeAndPlaySample(char* sampleData, int sampleLength)
|
||||
|
||||
[audioLock lock];
|
||||
if (audioBufferQueueLength > MAX_QUEUE_ENTRIES) {
|
||||
printf("Audio player too slow. Dropping all decoded samples!\n");
|
||||
NSLog(@"Audio player too slow. Dropping all decoded samples!");
|
||||
|
||||
// Clear all values from the buffer queue
|
||||
struct AUDIO_BUFFER_QUEUE_ENTRY *entry;
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
}
|
||||
|
||||
- (void)connectionTerminated:(long)errorCode {
|
||||
printf("Connection terminated: %ld\n", errorCode);
|
||||
NSLog(@"Connection terminated: %ld", errorCode);
|
||||
|
||||
UIAlertController* conTermAlert = [UIAlertController alertControllerWithTitle:@"Connection Terminated" message:@"The connection was terminated" preferredStyle:UIAlertControllerStyleAlert];
|
||||
[conTermAlert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){
|
||||
@@ -92,7 +92,7 @@
|
||||
}
|
||||
|
||||
- (void) stageStarting:(char*)stageName {
|
||||
printf("Starting %s\n", stageName);
|
||||
NSLog(@"Starting %s", stageName);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSString* lowerCase = [NSString stringWithFormat:@"%s in progress...", stageName];
|
||||
NSString* titleCase = [[[lowerCase substringToIndex:1] uppercaseString] stringByAppendingString:[lowerCase substringFromIndex:1]];
|
||||
@@ -127,11 +127,11 @@
|
||||
}
|
||||
|
||||
- (void) displayMessage:(char*)message {
|
||||
printf("Display message: %s\n", message);
|
||||
NSLog(@"Display message: %s", message);
|
||||
}
|
||||
|
||||
- (void) displayTransientMessage:(char*)message {
|
||||
printf("Display transient message: %s\n", message);
|
||||
NSLog(@"Display transient message: %s", message);
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
|
||||
Reference in New Issue
Block a user