• 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: Basic AudioQueue Service issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic AudioQueue Service issue


  • Subject: Re: Basic AudioQueue Service issue
  • From: William Stewart <email@hidden>
  • Date: Wed, 22 Oct 2008 18:02:35 -0700

I understand your frustration.

However, we can't fix bugs if we are just going to get random comments about "i've tried this and blah happens". I know that sucks, but we aren't prescient.

A good procedure to follow is to have an example - lets say you start with speak here or aqplay - and you modify it in some way to do what you want it to do. it doesn't work. A simple post to describe what you tried to do and why it didn't work is not a bad starting point. If we get to the point that what we think you are doing should work, then we would have you file a bug and attach some code so that we can see the problem happening and then understand it.

I really have no idea what to do with these kinds of complaints though - I know it sounds obvious to you, but to me what you have changed/ done to do this is completely opaque.

Bill

On Oct 20, 2008, at 8:33 PM, Craig Patchett wrote:

I'm trying to do the same thing and am having all kinds of problems. Would it be possible for someone to provide a code solution or a summary of what changes need to be made in order to replay a queue without reinitializing it? Specifically:

- How to restart a queue after it has finished playing
- How to restart a queue that is currently playing

It seems like it should be simple to do, and perhaps it is for someone with a lot of experience with CoreAudio, but finding the right combination of method calls is approaching black magic for me! Specifically I've run into the following problems:

- No sound after the queue has played all the way through (like Romain describes)
- The sound not playing properly the second time through (usually with an echo of some sort)
- Various crashes and freezes that seem to be related to locking issue
- A pop when the sound is restarted during playback


I've come up with various combinations of ideas that end up resolving one or two of these problems but have yet to come up with something that solves them all. I've spent enough time in both the SpeakHere sample code and the AudioQueue guide sample code that I understand what's going on in the code, but the behind-the-scenes behavior of the various AudioQueue calls seems to be what's giving me trouble.

I've spent more time than I care to admit trying to come up with a solution to this and would really appreciate any help. At this stage I'm even willing to put my money where my mouth is and offer $100 for a working, coded solution.

Thanks.

Craig

On Oct 20, 2008, at 11:08 AM, Romain Pechayre wrote:

Hello,

I am new to CoreAudio Programming and I have a problem with an AudioQueue. I use it to play a simple short sound but I need to control the volume, that is why I don't use SystemSounds instead.
I am trying to play an audioqueue without having to initialize it from scratch every time I use it. For example, I don't want to open the associated file every time I play the sound.
To do so, I have tried to customize the playBackCallback function from SpeakHere iPhone sample code. It is pretty much the same as the one used in AudioQueue Services Programming guide. I have just set mCurrentPacket to 0 every time I call the callback function. It seems to work well because it reads the same number of packets with audiofileReadPackets everytime I call it. The problem is that the sound is actually played only when I call AudioQueueStart for the first time.
To be more specific, I have a button that is supposed to play a sound when I press it. It works when I press it for the first time but it does not as of the second time. I have tried debugging a number of parameters including everything I could in the callback function, and the behavour seems to be the same except that the sound is actully played only at the first attempt.


I was therefore wondering if is technically possible to play an AudioQueue again and again without having to initialize it from scratch ( which means calling CFURLCreateFromFileSystemRepresentation and AudioQueueNewOutput ).

I hope the formulation of my question is not too bad and you will be able to help me.

Kind regards

Romain Pechayre
_______________________________________________
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


  • Follow-Ups:
    • Re: Basic AudioQueue Service issue
      • From: Alex Kac <email@hidden>
    • Re: Basic AudioQueue Service issue
      • From: Craig Patchett <email@hidden>
  • Prev by Date: Re: using AUMatrixMixer & format conversions
  • Next by Date: Re: Basic AudioQueue Service issue
  • Previous by thread: Re: Basic AudioQueue Service issue
  • Next by thread: Re: Basic AudioQueue Service issue
  • Index(es):
    • Date
    • Thread