×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Registered User
    Join Date
    Mar 2008
    Location
    SLOVAKIA,Bratislava
    Posts
    337

    Lightbulb E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    C++Beginner (MS Access/FoxPro,VisualBasic Developer) Carbide V2.7,S60 3rd MR SDK/Nokia C5.00-5mp,6120c

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,179

    Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    SDK helps says: This panic is raised by the Start(), Stop() and Add() member functions of an active scheduler, a CActiveScheduler. It is caused by attempting to start or stop an active scheduler or by attempting to add an active object, a CActive, to the active scheduler.


    Anyway, Check which line causes the error,also are you uisng this in GUI app or in something else ?

  3. #3
    Registered User
    Join Date
    Mar 2008
    Location
    SLOVAKIA,Bratislava
    Posts
    337

    Lightbulb Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    It is NON-GUI (from Hello World)
    Code:
    LOCAL_C void DoStartL()
    	{
    	// Create active scheduler (to run active objects)
    	//iSoundEngine = new (ELeave) CSoundEngine;
    	//  iSoundEngine = CSoundEngine::NewL();
    	CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    	CleanupStack::PushL(scheduler);
    	CActiveScheduler::Install(scheduler);
    
    	MainL();
    
    	// Delete active scheduler
    	CleanupStack::PopAndDestroy(scheduler);
    	}
    Code:
    GLDEF_C TInt E32Main()
    	{
    	// Create cleanup stack
    	__UHEAP_MARK;
    	CTrapCleanup* cleanup = CTrapCleanup::New();
    if (KNumDEBUG >0)
    	{
    	// Create output console
    ...
    	TRAPD( mainError , DoStartL());
    
    //  +++++ PLAY SIMPLE TONE/SYSTEMSOUND, WHERE TO PLACE HERE...??
    // Inside ENGINE-sound , another CActiveScheduler...
    // need i some timing in Engine ...??
    // TRAPD(Error2,iSoundEngine = CSoundEngine::NewL());
    // DoPlayToneL();
    TRAPD(Error3,iTonePlayer = CTonePlayer::NewL());
    iTonePlayer->Play();
    iTonePlayer->Stop();
    delete iTonePlayer;
    ...
    C++Beginner (MS Access/FoxPro,VisualBasic Developer) Carbide V2.7,S60 3rd MR SDK/Nokia C5.00-5mp,6120c

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,179

    Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    You should check where you are getting the error. Also generally you can not call Play right after costruct, nor Stop right afetr play, You would indeed need to wait untill the MatoPrepareComplete is called before calling play, and then only if you would want to exit, before the MatoPlayComplete, would you be calling Stop.

  5. #5
    Registered User
    Join Date
    Mar 2008
    Location
    SLOVAKIA,Bratislava
    Posts
    337

    Lightbulb Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    Hi, it is now OK (without ..Complete), but with NO Tone...
    Tone engine: Playing_audio_tones

    How to call Complete..?
    I can NOT compile it..
    virtual void CTonePlayer::MatoPrepareComplete(TInt)' is protected
    ..
    // Error---> within this context
    iTonePlayer->MatoPrepareComplete(Er2);
    Code:
    //............ TonePlayer.h Error--->
    //	virtual void CTonePlayer::MatoPrepareComplete(TInt)' is protected
    //	virtual void CTonePlayer::MatoPlayComplete(TInt)'is protected	
    	void MatoPrepareComplete(TInt aError);
    	void MatoPlayComplete(TInt aError);
    
    //.......... TonePlayer.cpp
    void CTonePlayer::MatoPrepareComplete(TInt /*aError*/)
    //void CTonePlayer::MatoPrepareComplete(TInt aError)
    	{	
    iToneUtility->SetVolume(iToneUtility->MaxVolume());
    	} 
    void CTonePlayer::MatoPlayComplete(TInt /*aError*/)
    //void CTonePlayer::MatoPlayComplete(TInt aError)
    	{
    
    
    //.............MAin.cpp
    LOCAL_C void DoSoundL()
    	{
    	TInt Er2 = KErrNone;
    	TInt Er3 = KErrNone;	
    	{
    	console->Printf( KTonePlayer, 1);
    	console->Getch();	
    	TRAPD(Er1,iTonePlayer = CTonePlayer::NewL());
    	console->Printf( KTonePlayer, 1000 + Er1);
    	console->Getch();
    	
    // Error---> within this context
    	iTonePlayer->MatoPrepareComplete(Er2);
    	console->Printf( KTonePlayer, 2);
    	console->Getch();
    	
    	iTonePlayer->Play();
    	console->Printf( KTonePlayer, 2);
    	console->Getch();
    	
    // Error---> within this context	
    	iTonePlayer->MatoPlayComplete(Er3);
    	console->Printf( KTonePlayer, 3);
    	console->Getch();
    	
    	iTonePlayer->Stop();
    	console->Printf( KTonePlayer, 3);
    	console->Getch();
    Last edited by PACALA_BA; 2013-08-29 at 09:06.
    C++Beginner (MS Access/FoxPro,VisualBasic Developer) Carbide V2.7,S60 3rd MR SDK/Nokia C5.00-5mp,6120c

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,179

    Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    You will never ever call the MatoPrepareComplete yourself, the system will call it once the player is ready. Thus you would need to change your code to work in the right way, then you would have a chance to get it working.

  7. #7
    Registered User
    Join Date
    Mar 2008
    Location
    SLOVAKIA,Bratislava
    Posts
    337

    Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    It works..., with NO Tone/Sound...

    Or do i need a HeadSet ?

    Code:
    iFrequency(125),iDuration(5000000)
    Code:
    	console->Printf( KTonePlayer, 1);
    	console->Getch();
    	
    	TRAPD(Er1,iTonePlayer = CTonePlayer::NewL());
    	console->Printf( KTonePlayer, Er1);
    	console->Getch();
    	
    	iTonePlayer->Play();
    	console->Printf( KTonePlayer, 2);
    	console->Getch();
    	
    	iTonePlayer->Stop();
    	console->Printf( KTonePlayer, 3);
    	console->Getch();
    C++Beginner (MS Access/FoxPro,VisualBasic Developer) Carbide V2.7,S60 3rd MR SDK/Nokia C5.00-5mp,6120c

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,179

    Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    I don't like to repeat myself. Anyway, you can not call Play(); untill the player is prepared successfully, i.e. you must make sure that MatoPrepareComplete is called by the system. Also see that you are setting volume, and using the device max-volume as reference on what is the max value.

    For speaker routing, you generally do not need to care, its played on the default output.

  9. #9
    Registered User
    Join Date
    Mar 2008
    Location
    SLOVAKIA,Bratislava
    Posts
    337

    Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    untill the player is prepared successfully,
    TRAPD(Er1,iTonePlayer = CTonePlayer::NewL());
    Er1=0....the player is prepared successfully ? or NOT ?

    if (Er1=0) then iTonePlayer->Play();
    C++Beginner (MS Access/FoxPro,VisualBasic Developer) Carbide V2.7,S60 3rd MR SDK/Nokia C5.00-5mp,6120c

  10. #10
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,179

    Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    Sorry, appears that there are coupld of issues, and one was that I should have checked the example better. Basically your code is ok, the NewL wil construct the thing ok.

    Anyway, I would suspect that there is an error on the coding part, actyalu few bad design issues. But the most important part is that iMdaAudioToneUtility->Play(); line should be cut out and pasted after the iMdaAudioToneUtility->SetVolume(iMdaAudioToneUtility->MaxVolume()); line. Then if the logic works there then calling the PrepareToPlayTone, should cause the MatoPrepareComplete to be called, when the play would start with full volume.

    Anyway, do remember to set something into the iTones array

  11. #11
    Registered User
    Join Date
    Mar 2008
    Location
    SLOVAKIA,Bratislava
    Posts
    337

    Thumbs up Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    Hi, symbianyucca
    you are right,....
    this logic errors, all it is without errorr, but something does not work...
    It really works, i can now play with parameters...
    THANKS
    Code:
    void CTonePlayer::ConstructL()
    	{  
    	iToneUtility = CMdaAudioToneUtility::NewL(*this);
    	// iToneUtility->PrepareToPlayTone(iFrequency,iDuration);
    	} 
    //void CTonePlayer::Play()
    void CTonePlayer::Play(TInt aFrequency,TTimeIntervalMicroSeconds aDuration)
    	{
    	iToneUtility->PrepareToPlayTone(aFrequency,aDuration);
    	iToneUtility->SetVolume(iToneUtility->MaxVolume());	
    	iToneUtility->Play();
    	} 
    void CTonePlayer::Stop()
    	{	
    iToneUtility->CancelPlay();
    	}
    void CTonePlayer::MatoPrepareComplete(TInt /*aError*/)
    	{	
    	} 
    void CTonePlayer::MatoPlayComplete(TInt /*aError*/)
    	{
    	}
    C++Beginner (MS Access/FoxPro,VisualBasic Developer) Carbide V2.7,S60 3rd MR SDK/Nokia C5.00-5mp,6120c

  12. #12
    Registered User
    Join Date
    Mar 2008
    Location
    SLOVAKIA,Bratislava
    Posts
    337

    Thumbs down Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    Hi, the story is still going on...
    on Nokia N6120c (old phone).........................OK
    on Nolia C5-00.5MP(new phone)....................NO Tone/Sound
    Also Tested with Debug Version, the same NO Sound on new...
    What may be wrong...?
    C++Beginner (MS Access/FoxPro,VisualBasic Developer) Carbide V2.7,S60 3rd MR SDK/Nokia C5.00-5mp,6120c

  13. #13
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,179

    Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    please move

    iToneUtility->SetVolume(iToneUtility->MaxVolume());
    iToneUtility->Play();

    in to the MatoPrepareComplete function

  14. #14
    Registered User
    Join Date
    Mar 2008
    Location
    SLOVAKIA,Bratislava
    Posts
    337

    Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    On non.gui app ...no sound
    Audiostremexample(appview+appui)+toneplayer+helloworld..succes with sound
    But still without callback complete()....
    I need now convert gui app to self.start.and.exit...

    Appui.construct(.....at end call exit()..no sound)
    Appview.construct()
    Or active scheduler.start (appui/view)?
    C++Beginner (MS Access/FoxPro,VisualBasic Developer) Carbide V2.7,S60 3rd MR SDK/Nokia C5.00-5mp,6120c

  15. #15
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,179

    Re: E32USER-CBase 44 panic when I try to use a CMdaAudioPlayerUtility?

    Basically, if you got it working on one environemnt, then you have a good reference which you could compare against the implementations which are not working. Basically, see that what parts are failing to work, and then see what is the problem on those parts

Similar Threads

  1. Panic :E32USER-CBase 64
    By AmbikaSingh in forum Symbian User Interface
    Replies: 1
    Last Post: 2011-06-28, 13:39
  2. Panic E32USER-CBase
    By elviin in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2008-09-18, 07:44
  3. E32USER-CBase 91 panic
    By erst in forum Symbian
    Replies: 0
    Last Post: 2007-07-11, 17:55
  4. PANIC E32User-CBase 69
    By paler in forum Symbian
    Replies: 1
    Last Post: 2005-09-05, 04:31
  5. e32user-cbase panic
    By stew_mclean in forum Symbian
    Replies: 6
    Last Post: 2004-07-17, 19:22

Posting Permissions

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