×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Regular Contributor
    Join Date
    May 2003
    Posts
    88

    YUCCA:sound to be included in other application

    Hi,
    I am trying to include in some other application..but the problem is that i am making a class which is derived from MMdaAudioToneObserver and thus want to call this from a view but aftre successful compilation the memory error occurs..
    what is the problem?


    reply immediately

    rgds
    techno2003

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

    Could you write down the WHOLE error description string (ones more), since othervise it's impossible to quess what might be you problems source.

    Like all other times, try putting breakpoints to your code and to locate the line in your code that get's executed last. Would save your time as well as anybodies who try to find solutions for you.

    yucca

  3. #3
    Regular Contributor
    Join Date
    May 2003
    Posts
    88

    Thanx Yucca!!!!! Need some file!!!!!

    hi,
    i was able to solve the problem by breakppint inclusion but the other problem is that i am abale to play the tone but not any file........is there a special format for the PrepareToPlayFileSequence function ...as i am trying to play .wav file using this...but using this the player panics and gives a breakpint error......if there is pls give me those files which i can test for my application......

    regards
    techno2003

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

    Incase you just need a simple method of playing sound files, you could try this code:

    //start of code

    void CMyContainer::PlayRingToneL(const TDesC& aFileName)
    {
    TBaSystemSoundType soundType(KSystemSoundRingUID);
    TBaSystemSoundName soundName(aFileName);
    TBaSystemSoundInfo soundInfo(soundType, soundName);

    BaSystemSound::SetSoundL(NSuiteEnv::TheRFs(), soundInfo);
    CoeSoundPlayer::PlaySoundNow (soundType);
    }

    //end of code

    for you problem, I don't really know what could be wrong. The sound files should works same way always, at lest there shouldn't be any problem using wav if you can made Midis work (otherway around I could understand), so just check all examples there are available and double check your code one more time.

    yucca

  5. #5
    Regular Contributor
    Join Date
    May 2003
    Posts
    88

    Defining a TUid?

    Yucca

    how to define a KSystemSoundRingUID which u have given in the code..also if we can play the same wav file which we are used to play...if not what knid of file we can play....

    rgds
    techno2003

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    the constant is defined in bassnd.h

    yucca

  7. #7
    Regular Contributor
    Join Date
    May 2003
    Posts
    88

    what is aFilename?

    hi,
    TBaSystemSoundName soundName(aFileName);

    which file to be given the name aFileName

    rgds
    techno2003

  8. #8
    Regular Contributor
    Join Date
    May 2003
    Posts
    88

    what is aFilename? Midi not working

    hi,
    TBaSystemSoundName soundName(aFileName);

    which file to be given the name aFileName

    it is a system file..i tried midi but it didn't worked....


    rgds
    techno2003

  9. #9
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    Hi

    Test it in the phone, I have a feeling that it doesn't really work on the emulator. It should be able to play any valid sound file. Be careful not to try playing zero byte sized files, since I remember it jamming the phone (anyway, if you manage to do it just remove battery), same behaviour of course happens with AudioRecorder also.

    yucca

  10. #10
    Regular Contributor
    Join Date
    May 2003
    Posts
    88

    IS it the same regarding the Sound application using different coders

    hi,
    Do u mean that the things which were posing a prob on the sound trecorder application on the emulator will run fine on the device ?
    it due to the formats of the files which we r running or any other reason...i thought the same? if that is true then there will be many things which will not wrok out as they r many things which will be device specific?


    rgds
    techno2003

  11. #11
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    Hi

    Nope, what I meant that the CoeSoundPlayer might not really work in emulator, on phone it works well.

    The audiorecorder and others work both in emulator & phone. The zero lentgh file jamming the phone will apply on both methods on playing files.

    yucca

  12. #12
    Regular Contributor
    Join Date
    May 2003
    Posts
    88

    But using file it is not working on the emulator

    Hi,
    thanx for the timely help......but deat the function preparetoplayfilesequence is not working on the emulator but the same code works well while playing tones..wat is the reason behind this..i am giving a midi sound to play also i have tried to play a wav file too...
    the problems regrading sound recorder using different coder still persist and also regarding paying a file sequence remains


    rgds
    techno2003

  13. #13
    Registered User
    Join Date
    Sep 2003
    Posts
    34

    fsSession definition

    Hi,

    Here please provide me the info
    BaSystemSound::SetSoundL(NSuiteEnv::TheRFs(), soundInfo);

    Where we will define NSuiteEnv::TheRFs(), and what should be the definition.

    Thanks
    Anil

  14. #14
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    Hi

    Use CCoeEnv::Static()->FsSession() for it, it basically just RFs.

    yucca

  15. #15
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    346

    Re: YUCCA:sound to be included in other application

    aFileName is the name of the file including the file extension right?


    where should i put the file to be called as aFileName is it in the data directory or where?

Posting Permissions

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