• 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
RE: trouble with AudioQueuePause() and AudioQueueStart()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: trouble with AudioQueuePause() and AudioQueueStart()


  • Subject: RE: trouble with AudioQueuePause() and AudioQueueStart()
  • From: "Andrew E. Davidson" <email@hidden>
  • Date: Wed, 15 Jul 2009 12:20:16 -0700

Hi William

You are correct. It has been several months since I last looked at this
code. Once I started digging in I realized there was no need to explicitly
stop or pause the queue object I was using with AQOfflineRender

Thanks

Andy

________________________________

Replace Ads with your Stuff! Learn how @  www.prowebsurfer.com

> -----Original Message-----
> From: William Stewart [mailto:email@hidden]
> Sent: Wednesday, July 15, 2009 12:09 PM
> To: Andrew E. Davidson
> Cc: 'Doug Wyatt'; email@hidden
> Subject: Re: trouble with AudioQueuePause() and AudioQueueStart()
>
> I think you misunderstood Doug's point.
>
> When you are in offline render mode, your code is directly calling the
> AQOfflineRender call - so when you get the message to pause, just stop
> calling AQOfflineRender, and when you get the resume, start calling it
> again.
>
> The offline case is different than the normal case where the AQ is
> running in the context of the device I/O and you have no direct access
> to the rendering operations of the queue - so you issue commands to
> resolve that. In the offline case, you are providing the rendering
> context and you control that completely
>
> HTH
>
> Bill
>
> On Jul 14, 2009, at 5:04 PM, Andrew E. Davidson wrote:
>
> > Hi Doug
> >
> > Thanks Doug. I would never have thought of using AudioQueueStop in
> > place of
> > AudioQueuePause()
> >
> > I all I want to do is to continue playback or record where we left
> > off when
> > the user pressed the pause button. I have no idea how AudioQueue's are
> > implemented. Reading the documentation I found AudioQueuePause() I
> > assumed
> > that AudioQueueStop() must do something else? Possible cause
> > something to
> > reset?
> >
> > Turns out for me changing the implementation to the following is
> > going to be
> > a little tricky.
> > - (void) pause {
> > 	AudioQueueStop()
> > }
> >
> > - (void) resume {
> > 	AudioQueueStart();
> > }
> >
> > I have a couple of queue objects, and various wrappers to hide the
> > complexity. I will have to redesign the way state change
> > notifications get
> > propagated so that I do not delete objects that are only paused. It
> > is not a
> > big deal. Well worth it if I can get my bug fix out released before
> > OS 3.1
> >
> > Thanks
> >
> > Andy
> >
> > ________________________________
> >
> > Replace Ads with your Stuff! Learn how @  www.prowebsurfer.com
> >> -----Original Message-----
> >> From: Doug Wyatt [mailto:email@hidden]
> >> Sent: Tuesday, July 14, 2009 4:24 PM
> >> To: Andrew E. Davidson
> >> Cc: email@hidden
> >> Subject: Re: trouble with AudioQueuePause() and AudioQueueStart()
> >>
> >>
> >> On Jul 14, 2009, at 15:53 , Andrew E. Davidson wrote:
> >>
> >>> My iPhone application is built on top of AudioQueueOfflineRender()
> >>>
> >>> On OS 2.2.1 I use to implement a pause and resume button on my UI.
> >>> The
> >>> implementation was really simple
> >>>
> >>> - (void) pause {
> >>> 	OSStatus status = AudioQueuePause( queueObj ) ;
> >>> 	If ( status != noErr ) {
> >>> 		Error handling
> >>> 	}
> >>> }
> >>>
> >>> - (void) resume {
> >>> 	OSStatus status = AudioQueueStart( queueObj, nil );
> >>> 	If ( status != noErr ) {
> >>> 		Error handling
> >>> 	}
> >>> }
> >>>
> >>>
> >>> This worked fine on OS 2.2.1. How ever when ever I run the 2.2.1
> >>> binary on
> >>> OS 3.0 or even when I compile for OS 3.0 the call to AudioQueueStart
> >>> () in
> >>> resume: returns error -66681 "kAudioQueueErr_CannotStart"
> >>
> >>
> >> What are you trying to accomplish by pausing a queue that's in
> >> offline
> >> rendering mode? Why not just stop calling it to render? (clearly this
> >> is a bug, but I don't see why it's an important one)
> >>
> >> Doug
> >>
> >
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Coreaudio-api mailing list      (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >trouble with AudioQueuePause() and AudioQueueStart() (From: "Andrew E. Davidson" <email@hidden>)
 >Re: trouble with AudioQueuePause() and AudioQueueStart() (From: Doug Wyatt <email@hidden>)
 >RE: trouble with AudioQueuePause() and AudioQueueStart() (From: "Andrew E. Davidson" <email@hidden>)
 >Re: trouble with AudioQueuePause() and AudioQueueStart() (From: William Stewart <email@hidden>)

  • Prev by Date: Re: MultiChannelMixer vs 3dMixer
  • Next by Date: AU automation
  • Previous by thread: Re: trouble with AudioQueuePause() and AudioQueueStart()
  • Next by thread: AU automation
  • Index(es):
    • Date
    • Thread