Question

How can I access the instance of the SPTCoreAudioController that is associated with my instance of a SPTAudioStreamingController?

I need to assign a SPTCoreAudioControllerDelegate so that I may handle coreAudioController:didOutputAudioOfDuration in order to, as you say, "keep track of how much audio has been played back for progress indicators and so on".

Thanks!

Was it helpful?

Solution

You retrieve it from wherever you put it. If you initialise like this…

self.coreAudio = [MyAwesomeCoreAudioController new];
self.streaming = [[SPTAudioStreamingController alloc]
                      initWithCompanyName:@"DanCorp"
                                  appName:@"MyApp"
                          audioController:self.coreAudio];

…you can access it with self.coreAudio.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top