×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    How to play Audio with Streaming from Internet?

    Hi

    i post my problem on following platform, but nobodies give me any answer please help me if anybody knows answer.

    http://discussion.forum.nokia.com/fo...d.php?t=167486

    Regards,
    SymbianTH

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: How to play Audio with Streaming from Internet?

    what is the error code u r getting??

  3. #3
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    Re: How to play Audio with Streaming from Internet?

    Hi

    Give me a -5 error.

    i post code on
    http://discussion.forum.nokia.com/fo...065#post586065

    Thanks
    SymbianTH

  4. #4
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: How to play Audio with Streaming from Internet?

    Quote Originally Posted by SymbianTH View Post
    Hi

    Give me a -5 error.

    i post code on
    http://discussion.forum.nokia.com/fo...065#post586065

    Thanks
    SymbianTH
    -5 means KErrNotSupported, Which sdk u r using . Check wheather that .ra audio file is supported on that sdk version or devices.

    Also continue with this thread.....
    Last edited by kishore84; 2009-05-13 at 11:04.

  5. #5
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    Re: How to play Audio with Streaming from Internet?

    Hi

    I am using S60 3rd MR, FP1, FP2 edition and this think i Played in destktop's real player its played successfully.

    but same link played on Emulator -> File (Menu Option) -> OpenURL ->
    it's do played. i tried following all audio link in emulator but do not work in emulator's real player.

    rtsp://rmlive.bbc.co.uk/bbc-rbs/rmlive/ev7/live24/radio1/live/r1_dsat_g2.ra
    http://corsari.altervista.org/download/RadioFG.m3u
    http://www.rin.it/player/rindigital.asx

    if you have a any audio file link which work on emulator than please give me.

    My Updated Code is:
    Code:
    AppUi
    -----
    void CAudioStreamAppUi::HandleCommandL(TInt aCommand)
        {
        switch ( aCommand )
            {
            case EAudioStreamCmdPlay:
                {
                iAudioPlayer = CAudioPlayerAdaptor::NewLC(this);
                iAudioPlayer->iWantToPlay = ETrue;
                iAudioPlayer->StartPlay();
                break;
                }
            default:
                break;      
            }
        }
    
    AudioPlayerAdaptor.cpp
    ----------------------
    #include "AudioPlayerAdaptor.h"
    
    _LIT(KErrorSetLabel, "Error setting label");
    #ifdef __WINSCW__
    const TInt KMaxSound(65535);
    #else
    const TInt KMaxSound(100);
    #endif
    
    
    CAudioPlayerAdaptor* CAudioPlayerAdaptor::NewLC(CAudioStreamAppUi* aAppUi)
      {
      CAudioPlayerAdaptor* self = new (ELeave) CAudioPlayerAdaptor(aAppUi);
      CleanupStack::PushL(self);
      self->ConstructL();
      return self;
      }
    
    CAudioPlayerAdaptor::~CAudioPlayerAdaptor()
      {
      PlayCleanup();
      }
    
    void CAudioPlayerAdaptor::SetFileL()
      {
      
      }
    
    void CAudioPlayerAdaptor::StartPlay()
      {
      if(iState == EIdle && iWantToPlay)
        {
        //iAuPlayUtil->RegisterForAudioLoadingNotification(*this);
        //TRAPD(err, iAuPlayUtil = CMdaAudioPlayerUtility::NewFilePlayerL(iAuFilePath,*this));
        TRAPD(err, iAuPlayUtil = CMdaAudioPlayerUtility::NewL(*this));
        
        if(err)
          {
          ShowError(err);
          return;
          }
        
        iState = EPrepare;
        iWantToPlay = ETrue;
        iAuPlayUtil->OpenUrlL(_L("rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/worldservice/livenews_v8.ra"));
        User::InfoPrint(_L("Play"));
        }
      else if(iState == EPaused && iWantToPlay)
        {
        iAuPlayUtil->Play();
        iState = EPlaying;
        User::InfoPrint(_L("Play"));
        }
      }
    
    void CAudioPlayerAdaptor::PausePlay()
      {
      if(iState == EPlaying)
        {
        iAuPlayUtil->Pause();
        iState = EPaused;
        User::InfoPrint(_L("Pause"));
        }
      }
    
    void CAudioPlayerAdaptor::StopPlay()
      {
      if(iAuPlayUtil)
        {
        iAuPlayUtil->Stop();
        iAuPlayUtil->Close();
        }
      PlayCleanup();
      iState = EIdle;
      iWantToPlay = EFalse;
      User::InfoPrint(_L("Stop"));
      }
    
    void CAudioPlayerAdaptor::ViewConstructL()
      {
      iAuFolderPath = KInitFolderPath;
      iAuFilePath = KInitAudioPath;
      }
    
    
    CAudioPlayerAdaptor::CAudioPlayerAdaptor(CAudioStreamAppUi* aAppUi)
      : iAuPlayUtil(0), iVolume(KMaxSound), iState(EIdle), iDialogLock(EFalse),
      iAuFolderPath(0), iAuFilePath(0), iWantToPlay(EFalse)
      {
      }
    
    void CAudioPlayerAdaptor::ConstructL()
      {
       iAuFolderPath = KInitFolderPath;
       iAuFilePath = KInitAudioPath;
      }
    
    void CAudioPlayerAdaptor::MapcInitComplete(TInt aError,
                                                const TTimeIntervalMicroSeconds& /*aDuration*/)
      {
      if(aError != KErrNone) //Here Give me aError = -5 error.
        {
        TBuf<20> errBuf;
        errBuf.Num(aError);
        PlayCleanup();
        }
      else
        {
        iAuPlayUtil->SetVolume(iVolume);
        iAuPlayUtil->Play();
        iState = EPlaying;
        }
      }
    
    void CAudioPlayerAdaptor::MapcPlayComplete(TInt aError)
      {
      if(aError != KErrNone)
        {
        TBuf<20> errBuf;
        errBuf.Num(aError);
        }
      PlayCleanup();
      }
    
    void CAudioPlayerAdaptor::PlayCleanup()
      {
      if(iAuPlayUtil)
        {
        delete iAuPlayUtil;
        iAuPlayUtil = NULL;
        }
      iState = EIdle;
      iWantToPlay = EFalse;
      }
    
    void CAudioPlayerAdaptor::ShowError(TInt aErr)
      {
      _LIT(KErrInfo, "Err: %d");
      TBuf<20> errInfo;
      errInfo.Format(KErrInfo, aErr);
      User::InfoPrint(errInfo);
      }
    
    void CAudioPlayerAdaptor::MaloLoadingStarted()
    	{}
    
    void CAudioPlayerAdaptor::MaloLoadingComplete()
    	{}
    Last edited by SymbianTH; 2009-05-14 at 13:13.

  6. #6
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    Unhappy Re: How to play Audio with Streaming from Internet?

    Hi

    Please give me answer or any suggestion for solve this problem.

    Is it possible to do "audio streaming from Internet" in another way?

    If possible than please tell me

    Regards,
    SymbianTH

  7. #7
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    Re: How to play Audio with Streaming from Internet?

    Hi

    Please give me replay...

    nobody have to do this type of application? I am very helpless because i tried all things, I applied CODEC also but unsuccessful result.

    Please now give me idea how's its possible.

    Please send me replay. my mailid: taruna.ppl@gmail.com

    Regards,
    SymbianTH

Similar Threads

  1. double buffer for stream and play audio in J2ME
    By cibenxs in forum Mobile Java General
    Replies: 0
    Last Post: 2008-06-12, 11:22
  2. Load and play audio file
    By itenel in forum Symbian C++
    Replies: 4
    Last Post: 2004-05-17, 07:20
  3. Streaming Audio from Internet
    By amitaggarwal in forum Mobile Java General
    Replies: 1
    Last Post: 2004-03-17, 11:14
  4. Streaming Audio from Internet
    By amitaggarwal in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2004-03-17, 07:45
  5. Streaming Audio from Internet .
    By amitaggarwal in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2004-03-17, 07:43

Posting Permissions

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