×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    26

    How to get the duration from sound file?

    Hallo All,
    I need some help. Can you show me how to use CMdaAudioPlayerUtility:uration() ?

    I already open the file like this:

    iMdaAudioPlayerUtility = CMdaAudioPlayerUtility::NewL(*this);
    iMdaAudioPlayerUtility->OpenFileL(aFileName);

    The Play() and Stop() functions work fine.
    But when iMdaAudioPlayerUtility->Duration() called, it seems like the function raises a CMdaAudioPlayerUtility 1 panic and my program get closed.

    I want to display the duration like a clock, example 01:12.
    I saw sound example but it not giving the duration example.


    Thanks

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi,

    what sound format do you speak about? AMR? If the Duration() method not works you could compute it from file lenght. First you need to detect which amr encoding type is used. Because amr has fixed length for given time period you could easily compute the duration of sound clip.

    Bye
    STeN

Posting Permissions

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