Streaming audio (app crashing)

Discussion in 'iOS Development' started by e3m, Mar 29, 2009.

  1. e3m

    e3m New Member

    Joined:
    Sep 29, 2007
    Messages:
    8
    Likes Received:
    0
    I'm trying to stream audio in my iPhone app, but I get a warning and when i try to stream audio the app crashes.

    Code:
    - (IBAction)buttonPush {  
        if (!streamer) {  
              
            NSString *escapedValue = [(NSString *)CFURLCreateStringByAddingPercentEscapes(nil, (CFStringRef)streamURL, NULL, NULL, kCFStringEncodingUTF8)autorelease];  
              
            NSURL *url = [NSURL URLWithString:escapedValue];  
            streamer = [[AudioStreamer alloc] initWithURL:url];  
            [streamer addObserver:self forKeyPath:@"isPlaying" options:0 context:nil];  
            [streamer start];  
              
            [self setButtonImage:[UIImage imageNamed:@"loadingbutton.png"]];  
              
            [self spinButton];  
        }  
        else {  
            [button.layer removeAllAnimations];  
            [streamer stop];  
        }  
    }  
    
    Thanks
  2. NolesFans

    NolesFans New Member

    Joined:
    Sep 23, 2008
    Messages:
    404
    Likes Received:
    0
    Device:
    iPod touch
    I wonder what is warnings you get?

Share This Page