• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Handling NSRunLoop with AUGraph
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling NSRunLoop with AUGraph


  • Subject: Handling NSRunLoop with AUGraph
  • From: Sasikumar JP <email@hidden>
  • Date: Fri, 03 Jun 2011 10:35:16 +0530

Hi,

I am working on streaming audio application.

Sorry for cross posting, I am facing the issue with NSRunLoop and AUGraph.

What is the correct approach to handle the runloop with AUGraph. I have gone through the apple documentation and implemented the following.

1. Created a secondary thread using NSThread
2. In the thread method created a http socket stream and scheduled it with run loop
3 initialise the audio session and audio graph.
4. Opened the stream
5. Created the following loop
  do {
    Run the loop in default run loop mode
 } while (isRunning && ![self shouldStop];

When I want to stop playing the audio. I am calling AUGraphStop() then setting the flag shouldStop =YES to terminate the secondary thread.This case secondary thread hung, as it is not returning from runloop call.

If I dont call theAUGraphStop() when I stop the audio, thread is terminating as expected. But I am hearing noise as audio graph is stopped properly.

Is there anything wrong in the way I am handling the runloop with AUGraph which makes the runloop to wait for ever.

Any help is highly appreciated.

Thanks
Sasikumar JP

Sent from my iPad
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Handling NSRunLoop with AUGraph
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Programmatically displaying UISplitViewController popover?
  • Next by Date: Re: Programmatically displaying UISplitViewController popover?
  • Previous by thread: Re: Programmatically displaying UISplitViewController popover?
  • Next by thread: Re: Handling NSRunLoop with AUGraph
  • Index(es):
    • Date
    • Thread