×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    May 2009
    Posts
    89

    Playing system sounds

    Hi!

    I'm trying to play an error notification sound? Isn't this enough to do it?
    Code:
    TBaSystemSoundType soundType(KErrSystemSoundMessageUID);
    CoeSoundPlayer::PlaySoundNow(soundType);
    //T

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: Playing system sounds

    At least CMdaAudioToneUtility works. You can try.

  3. #3
    Super Contributor
    Join Date
    May 2004
    Posts
    2,265

    Re: Playing system sounds

    Hi,

    You can try this:

    Code:
    #include <aknsoundsystem.h> // CAknKeySoundSystem
    #include <avkon.hrh> // EAvkonSIDErrorTone
    #include <aknappui.h> // iAvkonAppUiBase
    ...
    CAknKeySoundSystem* kss = iAvkonAppUiBase->KeySounds();
    if(kss)
        {
        kss->PlaySound(EAvkonSIDErrorTone);
        }
    ...
    Regards

    Ziteng Chen

  4. #4
    Regular Contributor
    Join Date
    May 2009
    Posts
    89

    Re: Playing system sounds

    Quote Originally Posted by chenziteng View Post
    Hi,

    You can try this:

    Code:
    #include <aknsoundsystem.h> // CAknKeySoundSystem
    #include <avkon.hrh> // EAvkonSIDErrorTone
    #include <aknappui.h> // iAvkonAppUiBase
    ...
    CAknKeySoundSystem* kss = iAvkonAppUiBase->KeySounds();
    if(kss)
        {
        kss->PlaySound(EAvkonSIDErrorTone);
        }
    ...
    Regards

    Ziteng Chen
    That worked a charm! Thank you!

    //T

Similar Threads

  1. Replies: 13
    Last Post: 2008-01-04, 11:15
  2. HELP !auto-reply sms system (using 8250 & VB6)
    By dancingqueeneng in forum PC Suite API and PC Connectivity SDK
    Replies: 4
    Last Post: 2007-02-08, 07:08
  3. Replies: 1
    Last Post: 2006-11-30, 04:16
  4. Changes to default system sounds
    By craighew in forum Audio
    Replies: 1
    Last Post: 2006-11-24, 17:52
  5. playing sounds to the phone line
    By ilya_ in forum Symbian
    Replies: 1
    Last Post: 2003-05-23, 08:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •