×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    45

    Got Problem with playing wav file...

    Hi,
    I'm following this exampe for playing wav files:
    http://www.newlc.com/en/Playing-a-WAV-file.html

    What I did is this:
    in AppView.h I added:
    CSoundPlayer* iSoundPlayer;
    in AppView.cpp I added:
    iSoundPlayer=CSoundPlayer::NewL(_L("C:\\Apps\\sound\\Audio.wav"));
    iSoundPlayer->Play();
    Also I included the necessary headers and libs, and CSpundPlayer.cpp files.

    My error I'm getting is on this line: iSoundPlayer=CSoundPlayer::NewL(_L("C:\\Apps\\sound\\Audio.wav"));
    illegal assignment to constant

    here is the NewL func. from CSoundPlayer file:
    CSoundPlayer* CSoundPlayer::NewL(const TDesC& aFile)
    {
    CSoundPlayer* self = NewLC(aFile);
    CleanupStack::Pop(self);
    return self;
    }

    how to fix it?
    Thanks..

  2. #2
    Nokia Developer Moderator
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,347

    Re: Got Problem with playing wav file...

    Welcome to the Forum Nokia Developer Discussion boards.

    As you can see, this article http://www.newlc.com/en/Playing-a-WAV-file.html was posted in 2003...

    For which S60 edition (2nd or 3rd or 5th) you trying to write your application?

    Also I could recommend you to check this article in Wiki - Playing audio files

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    45

    Re: Got Problem with playing wav file...

    I'm working with S60 3rd..

  4. #4
    Nokia Developer Moderator
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,347

    Re: Got Problem with playing wav file...

    In this case you can use information provided in that article in Wiki.

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    45

    Re: Got Problem with playing wav file...

    but it is not being said about this error in that article ...

  6. #6
    Nokia Developer Moderator
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,347

    Re: Got Problem with playing wav file...

    I mean that you simply can use ready to use class from that article ( http://wiki.forum.nokia.com/index.ph...ng_audio_files ) for playing audio files from your application.
    Last edited by A.A.M.; 2009-03-01 at 11:59.

  7. #7
    Registered User
    Join Date
    Mar 2009
    Posts
    45

    Re: Got Problem with playing wav file...

    I did took those files form there..
    I didnt get u..

Similar Threads

  1. Problem with pyobfuscate
    By JOM in forum Symbian
    Replies: 3
    Last Post: 2008-06-20, 22:47
  2. problem when importing from carbide c++ to vs 2003!
    By misfit.physics in forum Symbian Tools & SDKs
    Replies: 12
    Last Post: 2008-02-19, 09:45
  3. Error with makesis.exe and creating the .pkg file
    By gramya87 in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2007-10-10, 13:53
  4. Problem in playing in an audio file.
    By PankajNeve in forum Symbian
    Replies: 3
    Last Post: 2007-03-09, 13:52
  5. Playing wav file through earpiece speaker in S80
    By mraty in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-08-04, 10:55

Posting Permissions

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