ListeningHelper is an audio player with speed changing function for macOS. It has the following functions:
- Music file playback
- Adjust Playback range
- Loop playback
- Speed(Rate) change
- Play pitch change
Without this we could not display the view with GarageBand.- (id)init {self = [super initWithNibName:@"AudioUnitViewController"bundle:[NSBundle bundleForClass:NSClassFromString(@"AudioUnitViewController")]];return self;}
Error loading {...snipped...}/SYVibratoFramework: dlopen({...
snipped...}/SYVibratoApp.app/Contents/Frameworks/SYVibratoFramework.framework/SYVibratoFramework, 265): Library not loaded: @rpath/SYFW.framework/Versions/A/SYFW
Referenced from: {...
snipped...}/SYVibratoApp.app/Contents/Frameworks/SYVibratoFramework.framework/SYVibratoFramework
Reason: image not foundPerhaps you can solve it without embedding if you can set @rpath.
254: Extension <private> advertises loadable bundle <private>, but we couldn't find itTo solve this error, I rechecked build settings, Info.plist, Sandbox related settings, etc...
To facilitate loading in-process and into a separate extension process, the .appx main binary cannot contain any code. Therefore, all the plugin functionality is contained in the FilterDemo.framework and the .appx Info.plist contains an AudioComponentBundle entry specifying the frameworks bundle identifier.In fact, FilterDemoExtension.m has only a function called dummy (), and all AU implementations seem to be thrust into FilterDemoFramework.framework.
xcsreciperunnerは、キーチェーンに含まれるキー"Xcode Server Root Certificate Authority"を使用して署名しようとしています。In English, this means "xcsreciperunner is trying to sign using the key "Xcode Server Root Certificate Authority" contained in the key chain."
Could not create client certificate authority: Error Domain=Security Code=-25293 "The user name or passphrase you entered is not correct." UserInfo={NSLocalizedDescription=The user name or passphrase you entered is not correct.}
2017-10-10 11:45:27.172 auvaltool[508:5335] Error: Session 091F49F0-C167-4CFB-820E-4DBCC049FD3B was unable to communicate with the remote service: Error Domain=NSCocoaErrorDomain Code=4099 "The connection from pid 512 was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection from pid 512 was interrupted, but the message was sent over an additional proxy and therefore this proxy become invalid.}
- (void)embedPlugInView {
NSURL *builtInPlugInURL = [[NSBundle mainBundle] builtInPlugInsURL];
NSURL *pluginURL = [builtInPlugInURL URLByAppendingPathComponent: @"SYVibrato.appex"];
NSBundle *appExtensionBundle = [NSBundle bundleWithURL: pluginURL];
self.vibratoViewController = [[AudioUnitViewController alloc] initWithNibName:@"AudioUnitViewController" bundle:appExtensionBundle];
[self.vibratoProgressIndicator stopAnimation:self]; NSRect r = self.vibratoView.frame;
[self.vibratoViewController view].frame = NSMakeRect(0, 0, NSWidth(r), NSHeight(r)); [self.vibratoView addSubview:self.vibratoViewController.view];
[self.vibratoViewController connectAU:self.vibratoUnit.AUAudioUnit];}
After a struggle, I found the error could be removed by turning off Sandboxing of my containing app.Error Domain=NSOSStatusErrorDomain Code=-3000 "invalidComponentID"
#include <CoreServices/CoreServices.h>#include <AudioToolbox/AudioToolbox.h>#define _ERR_RETURN(err) {if(noErr != err){printf("%d - err:%d\n", __LINE__, err); return err;}}OSStatus DecodeFileAtPath(const char *inputFilePath, const char *outputFilePath);OSStatus MyACComplexInputProc(AudioConverterRef inAudioConverter,UInt32 *ioNumberDataPackets,AudioBufferList *ioData,AudioStreamPacketDescription **outDataPacketDescription,void* inUserData);void SetStandardDescription(AudioStreamBasicDescription *descPtr);typedef struct MyConverterData {AudioFileID fileID;UInt64 totalPacketCount;UInt64 packetOffset;} MyConverterData;int main(int argc, char* argv[]) {if (argc != 3) {printf("usage: Mp3Decoder inFile outFile\n");return 0;}OSStatus err = DecodeFileAtPath((const char *)(argv[1]), (const char *)argv[2]);printf("done. err:%d\n", err);return 0;}/*read an audio file specified by inputFilePath and write as CD-DA format(big-endian) binary data to outputFilePath.
By the way, you should use an afconvert command is if you are not familiar with programming.This method is mainly intended to verify how to convert non-LPCM data such as MP3 or AAC to LPCM data. (.wav or .aiff are also readable)When failed, this method returns an OSStatus that is returned by internal CoreAudio functoins.*/OSStatus DecodeFileAtPath(const char *inputFilePath, const char *outputFilePath) {OSStatus err = noErr;AudioFileID fileID;MyConverterData myConverterData = {0, 0, 0};// open a file and get its ASBD and the number of packets.AudioStreamBasicDescription fileDesc;{CFURLRef url;url = CFURLCreateWithBytes(NULL,(const UInt8 *)inputFilePath,strlen(inputFilePath),kCFStringEncodingUTF8,NULL);err = AudioFileOpenURL(url,fsRdPerm,0,&fileID);_ERR_RETURN(err);myConverterData.fileID = fileID;UInt32 size = sizeof(AudioStreamBasicDescription);memset(&fileDesc, 0, size);err = AudioFileGetProperty(fileID,kAudioFilePropertyDataFormat,&size,&fileDesc);_ERR_RETURN(err);size = sizeof(myConverterData.totalPacketCount);err = AudioFileGetProperty(fileID,kAudioFilePropertyAudioDataPacketCount,&size,&myConverterData.totalPacketCount);_ERR_RETURN(err);}// sets output format(ASBD)AudioStreamBasicDescription outDesc;SetStandardDescription(&outDesc);// creates an AudioConverter using file's ASBD and output ASBD.AudioConverterRef converter;{err = AudioConverterNew(&fileDesc, &outDesc, &converter);_ERR_RETURN(err);}// set magic cookie if exits.// (otherwise !dat will be returned by AudioConverterFillComplexBuffer(){UInt32 size = 0;err = AudioFileGetPropertyInfo(fileID,kAudioFilePropertyMagicCookieData,&size,NULL);if(noErr == err){void *magic = calloc(1, size);err = AudioFileGetProperty(fileID,kAudioFilePropertyMagicCookieData,&size,magic);if(noErr == err){printf("magic cookie info found.\n");err = AudioConverterSetProperty(converter,kAudioConverterDecompressionMagicCookie,size,magic);_ERR_RETURN(err);}err = noErr;if(NULL != magic){free(magic);}_ERR_RETURN(err);}else{printf("magic cookie info not found.\n");}}const UInt32 maxNumPacketsInACycle = 100; // the number of packets to read in a loopFILE *fp = fopen(outputFilePath, "w");if (fp == NULL) {printf( "fopen failed.");return writErr;}err = noErr;// repeat until reading and decoding are finished.while(err == noErr){// exit loop if the last packet was processedif (myConverterData.packetOffset == myConverterData.totalPacketCount) break;UInt32 numPackets = maxNumPacketsInACycle; // the max number of packets to readUInt32 numFrames = fileDesc.mFramesPerPacket * numPackets; // the max number of frames to readAudioBufferList list;// preparation for list is needed (otherwise, -50 will be returned immediately without calling inputProc)list.mNumberBuffers = 1;list.mBuffers[0].mNumberChannels = 2;list.mBuffers[0].mDataByteSize = numFrames * outDesc.mBytesPerFrame; // maximum byte size after decoding.list.mBuffers[0].mData = malloc(list.mBuffers[0].mDataByteSize);err = AudioConverterFillComplexBuffer(converter,MyACComplexInputProc,&myConverterData,&numPackets,&list,NULL);if (err == noErr) {// read decoded datafwrite(list.mBuffers[0].mData, list.mBuffers[0].mDataByteSize, 1, fp);}free(list.mBuffers[0].mData);}// finalizefclose(fp);err = AudioConverterDispose(converter);_ERR_RETURN(err);err = AudioFileClose(fileID);return err;}/*A callback for AudioConvereter.This read required packets from file and set them to ioData.If these ASBDs are acquired, this returns them via outDataPacketDescription.An inUserData must be the pointer to a MyConverterData variable.*/OSStatus MyACComplexInputProc(AudioConverterRef inAudioConverter,UInt32 *ioNumberDataPackets,AudioBufferList *ioData,AudioStreamPacketDescription **outDataPacketDescription,void* inUserData) {// fileIDを取得するMyConverterData *myConverterDataPtr = (MyConverterData *)inUserData;AudioFileID fileID = myConverterDataPtr->fileID;// determine a data size to read from file// the size is calculated by multiplying the probable max packet size and the number of packets.// FIXME: the max packet size is NOT needed to be acquired in every callback.UInt32 maxPacketSize;UInt32 dataSize = sizeof(maxPacketSize);OSStatus err = AudioFileGetProperty(fileID,kAudioFilePropertyMaximumPacketSize,&dataSize,&maxPacketSize);_ERR_RETURN(err);UInt32 numBytes = maxPacketSize * *ioNumberDataPackets; // the probable maximum data size// allocate bufferstatic void *buffer = NULL;if (buffer != NULL)free(buffer);buffer = malloc(numBytes);// allocate memory for ASPD.static AudioStreamPacketDescription *descs = NULL;if (descs != NULL)free(descs);descs = malloc(sizeof(AudioStreamPacketDescription) * *ioNumberDataPackets);// reading from a fileerr = AudioFileReadPacketData(fileID,false,&numBytes,descs,myConverterDataPtr->packetOffset,ioNumberDataPackets,buffer);_ERR_RETURN(err);// sets acquired wave data to ioDataioData->mBuffers[0].mDataByteSize = numBytes;ioData->mBuffers[0].mData = buffer;// sets acquired ASPDs. For .wav or .aiff files, the code was skipped because NULL was setif (outDataPacketDescription != NULL) {*outDataPacketDescription = descs;}// update the number of read packetsmyConverterDataPtr->packetOffset += *ioNumberDataPackets;// output for debugif (myConverterDataPtr->packetOffset % 100 == 0) {printf("%llu/%llu\n", myConverterDataPtr->packetOffset, myConverterDataPtr->totalPacketCount);}return err;}/*sets CDDA-quality ASBD to descPtrTake care for use with little-endian processors because this function returns big-endian format.*/void SetStandardDescription(AudioStreamBasicDescription *descPtr) {descPtr->mSampleRate = 44100.0;descPtr->mFormatID = kAudioFormatLinearPCM;descPtr->mFormatFlags = kAudioFormatFlagIsBigEndian |kAudioFormatFlagIsSignedInteger |kAudioFormatFlagIsPacked;descPtr->mBytesPerPacket = 4;descPtr->mBytesPerFrame = 4;descPtr->mFramesPerPacket = 1;descPtr->mChannelsPerFrame = 2;descPtr->mBitsPerChannel = 16;}