AlertSoundPlay Deprecated

Discussion in 'Mac Programming' started by iDevCplusplus, Feb 3, 2010.

  1. iDevCplusplus macrumors newbie

    Joined:
    Jan 30, 2010
    #1
    I am currently updating my program for Snow Leopard. I get an alert when doing this, it tells me AlertSoundPlay is deprecated, what do I replace AlertSoundPlay with:confused:? Also where can I find reference for deprecated code, so I can updated to newer code.
    Thanks:)
     
  2. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #2
    Seriously, that is lazy. Here is an extract from the relevant header file, with the information you want removed. Took about five seconds to find it. You do know what Spotlight is? Or double-click on AlertSoundPlay, right-click "Show Definition"?



    Code:
    /* ================================================================================ */
    /* Public APIs                                                                      */
    /* ================================================================================ */
    /*
     *  AlertSoundPlay()   *** DEPRECATED ***
     *  
     *  Deprecated:
     *    Use xxxxxxxxxxxx(). Found in
     *    <xxx/xxx.h>
    
     
  3. iDevCplusplus thread starter macrumors newbie

    Joined:
    Jan 30, 2010
    #3
    Duh

    No kidding. What REPLACES AlertSoundPlay?!?:mad:
     
  4. jared_kipe macrumors 68030

    jared_kipe

    Joined:
    Dec 8, 2003
    Location:
    Seattle
    #4
    Use AudioServicesPlayAlertSound(). Found in <AudioToolbox/AudioServices.h>
     
  5. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  6. iDevCplusplus thread starter macrumors newbie

    Joined:
    Jan 30, 2010
  7. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #7
    This thread is incredibly depressing. Thank you for at least trying to get people to read headers, gnasher729.
     
  8. jared_kipe macrumors 68030

    jared_kipe

    Joined:
    Dec 8, 2003
    Location:
    Seattle
    #8
    He got me to read the header. But I'd rather someone walk away with the answer than confused and angry.
     
  9. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #9
    You didn't help him though.
     
  10. jared_kipe macrumors 68030

    jared_kipe

    Joined:
    Dec 8, 2003
    Location:
    Seattle
    #10
    Depends on your definition.
     

Share This Page