beep() sound on iphone?

Discussion in 'iOS Programming' started by alexandergre, Aug 24, 2009.

  1. alexandergre macrumors member

    alexandergre

    Joined:
    Jul 28, 2009
    #1
    in c#- c++, vis basic there is a method called console.beep(int1, int2);
    int1: frequency int2: duration.

    however is there such a thing in xCode?
    if no can you please tell me a program which can generate sounds with a specified frequency/duration?

    Thank you very much.
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
  3. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #3
    PlayAlertSound doesn't allow you to programatically and independantly set the frequency and duration.

    You could write a small audio synthesizer method and feed the resulting audio sample vector to Audio Queues or to the Audio Unit RemoteIO.
     
  4. mccannmarc macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #4
    Go with AudioQueues if any, RemoteIO is a powerful beast but its terribly documented and very cryptic to begin with. Use it only if you HAVE to
     

Share This Page