All About Symbian - Nokia (S60) and Sony Ericsson (UIQ) smartphones unwrapped

  #1  
Old 27-11-2002, 05:59 AM
Guest
 
Posts: n/a
Simplest way to play a sound

Could someone tell me the simplest possible way to play a beep or a wav-sound.
Im using a Nokia 9210.

  #2  
Old 27-11-2002, 09:24 AM
Mental Blank Mental Blank is offline
Registered User
 
Join Date: Sep 2002
Posts: 86
Mental Blank is on a distinguished road
Unfortunately, there is no "simple" way of doing this, as far as I know. You need to use the Media Server to play the file. Check out the documentation for CMdaAudioPlayerUtility.

There is also a User::Beep() function, but this doesn't seem to work on my 7650, as I recall.

  #3  
Old 27-11-2002, 09:48 AM
Mack Mack is offline
Registered User
 
Join Date: Nov 2002
Posts: 32
Mack is on a distinguished road
Can I find an example of this somewhere. I hate that documentation as there arent any examples :(
Ads

  #4  
Old 27-11-2002, 01:25 PM
Mental Blank Mental Blank is offline
Registered User
 
Join Date: Sep 2002
Posts: 86
Mental Blank is on a distinguished road
Try looking on Forum Nokia (www.forum.nokia.com). But a basic example (warning: untested!) would be...

[code:1]
class CMyClass : public CBase, public MMdaAudioPlayerCallback
{
public:
void PlaySoundL();
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
virtual void MapcPlayComplete(TInt aError);

// ...other variables...

private:
CMdaAudioPlayerUtility* iAudioPlayer;
};

void CMyClass::PlaySoundL()
{
iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL(_L("c: \\system\\data\\test.wav"), *this);
}

void CMyClass::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration)
{
iAudioPlayer->SetVolume(iAudioPlayer->MaxVolume());
iAudioPlayer->Play(); // action!
}

void CMyClass::MapcPlayComplete(TInt aError)
{
// ... do something ...
}
[/code:1]

Hope this helps.

  #5  
Old 28-11-2002, 07:55 AM
Mack Mack is offline
Registered User
 
Join Date: Nov 2002
Posts: 32
Mack is on a distinguished road
Thanks a lot even if it is untested I will test it and well see if I can get a working example

This was a good start for today !!
 

Bookmarks

Tags
play, simplest, sound

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mate's 3650 won't play sound when recording ??? cheech Nokia 3650, 3660, and 3620 3 04-08-2003 05:32 AM
Cant play videos on my phone with sound???:( Marius Nokia 7650 12 12-04-2003 12:21 AM
Play by SMS Chess, Checkers and Reversi from Purple for 7650 Rafe Series 60 1 16-12-2002 02:03 PM



All times are GMT. The time now is 02:32 PM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright Notes || Contact Us || Privacy Policy