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

Basic AudioQueue Service issue


  • Subject: Basic AudioQueue Service issue
  • From: Romain Pechayre <email@hidden>
  • Date: Mon, 20 Oct 2008 20:08:38 +0200

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: Craig Patchett <email@hidden>
    • Re: Basic AudioQueue Service issue
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: coremidi virtual endpoint problem
  • Next by Date: Re: coremidi virtual endpoint problem
  • Previous by thread: Re: coremidi virtual endpoint problem
  • Next by thread: Re: Basic AudioQueue Service issue
  • Index(es):
    • Date
    • Thread