AudioStreamer appDelegate?

In terms of your problems, it sounds like you should implement your AudioSteamer as a singleton, as this will prevent multiple instances from being created and provide a single point to control playback (i.e. : prevent multiple taps from triggering multiple playbacks).

Up vote 1 down vote favorite share g+ share fb share tw.

I have two things concerning AudioStreamer and I hope I'm getting some clues here: 1. I have set up a UITabBarController and in my Appdelegate is a AudioStreamer-Object. Two views refer to the appDelegate.streamer.

It it looks like that im getting two sessions when I release and alloc it new. I get two running audiosession. 2.

I use a UITableView to play out of this list. In the didSelectRowAtIndexPath-method I initialize with a URL. When the user taps with a fast double, or tripple-click.

The audiosession will get startet three times. Although i'm using a bool to prevent that. So my dirty solution is to set the system sleeping for a second.

It is ugly because the screen freezes for a sec. Thankfull for some hints Simon iphone iphone-sdk-4.0 audiostreamer link|improve this question edited Oct 1 '11 at 10:49DShah2,6824728 asked Dec 12 '10 at 1:10endo. Anaconda757320 90% accept rate.

In terms of your problems, it sounds like you should implement your AudioSteamer as a singleton, as this will prevent multiple instances from being created and provide a single point to control playback (i.e. : prevent multiple taps from triggering multiple playbacks). For more information on how to create a singleton class, see the "Creating a Singleton Instance" section within Apple's Cocoa Fundamentals Guide.

All my subviews don't have the streamer as object. Only in appDelegate is a streamer-object. So I think im using singelton.

– endo. Anaconda Dec 12 '10 at 14:51 @Simon - If you were using a singleton it would be impossible to have two instances and hence "two running audiosession". – middaparka Dec 12 '10 at 16:18.

For 2nd point. It is a bug of AudioStreamer class. Also this has been solved and code is put up on gitHub see link.

Also if this does not seems working then you can go to the pause method and add more states as below -(void)pause { if (state==AS_PLAYING || state==AS_BUFFERING || state==AS_WAITING_FOR_DATA) { //rest code goes same.... } // rest code goes same.... } this solved my same problem. Hope this will help you also...

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions