在iOS中实现Gracenote的问题提供了无效的用户和管理器,没有初始化。
GN_Entourage_Demo24927:70b getUserACR:错误:管理员未初始化2014-03-10 19:05:20.509 GN_Entourage_Demo24927:70b错误:当我实现时,GN_Entourage_Demo24927:70b错误:无效用户(lldb)
//初始化Entourage self.sdkManager = [GnSdkManager alloc initWithLicense:LICENSE_INFO错误:nil];
self.acrUser = [self getUserACR];
if (!self.acrUser) {
NSLog(@"Error: Invalid User");
}
// Create a GnAcr object for this user
self.acr = [[GnACR alloc] initWithUser:self.acrUser error:nil];
// Set up an audio configuration
GnAcrAudioConfig *config =
[[[GnAcrAudioConfig alloc] initWithAudioSourceType:GnAcrAudioSourceMic
sampleRate:GnAcrAudioSampleRate44100
format:GnAcrAudioSampleFormatPCM16
numChannels:1] autorelease];
// Initialize the GnAcr's audio configuration
[self.acr audioInitWithAudioConfig:config];
// Initialize the audio source (i.e. device microphone)
self.audioSource = [[GnAudioSourceiOSMic alloc] initWithAudioConfig:config];
// Assign the delegates
self.audioSource.audioDelegate = self;
self.acr.resultDelegate = self;
self.acr.statusDelegate = self;
self.isListening = NO;}
发布于 2014-04-04 22:22:00
iOS代码在LICENSE_INFO文本中的空格/换行符中有一个问题。您需要做的是将许可证字符串中的换行符替换为'\n‘(没有引号),这样LICENSE_INFO就只有一行长了。错误应该消失。
我们用下面的注释https://developer.gracenote.com/how-build-simple-entourage-application-ios更新了文档
谢谢,很抱歉给您带来不便!
https://stackoverflow.com/questions/22831788
复制相似问题