×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Oct 2004
    Location
    Hyderabad
    Posts
    38

    Playing Mp3 in Feature Pack 1

    Hi Yucca,
    is there any open API's for playing Mp3 in Feature Pack 1? can you tell me?
    Thanks in Advance.
    Regards,
    Ramakrishna

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,168
    normal audio recorder API should play MP3 files just fine.

    yucca

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    14
    What is "normal audio recorder API "? Can you talk about it in detail? I try to playback mp3 file on the emulator with Feature Pack 3, but failed. But from Feature Pack 1, mp3 playback should be supported by s60 platform. Does emulator support mp3 playback? Thank you!

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,168
    try it on the phone instead, emulators are known to not support all the stuff that is possible in the real phones.

    Basically just test the app with wav files in the emulator, and as soon as you get it working, try it in the phone with the target format files.

    yucca

  5. #5
    Registered User
    Join Date
    Mar 2005
    Location
    Hyderabad, India
    Posts
    19

    Playing Mp3 in 6600

    Hello all,

    I am presently working to play the Mp3 file in 6600.

    I am using the libmad library and integrated the code onto AudioStream example in order to play the MP3 file. My idea in implementation is as follows:

    (1) open MP3 file and decode using DecodeOneFrame() function given by Libmad library, storing the decoded output into an HBufC.

    (2) converting 16 bit data to 8 bit using ConvertFromUnicodeToUtf8() function and storing the resulting data into another HBufC8.

    (3) writing decoded output into a temporary file

    (4) reading the temporary file into the buffer as per the following code:

    RFile audiofile;
    err = audiofile.Open(fs, _L("c:\\Stream.buf"), EFileRead|EFileStream);
    if (err==KErrNone)
    {
    // file opened ok, proceed reading
    TInt idx=0;
    while (idx<iStreamBuffer.Count())
    {
    TInt fstatus=audiofile.Read(*iStreamBuffer[idx],
    (iStreamBuffer[idx])->MaxSize());
    if (fstatus!=KErrNone)
    break;
    idx++;
    }
    ShowMessageL(_L("Loading complete!"), true);
    }
    else
    {
    // failed to open file
    ShowMessageL(_L("Error loading audio sample!"), true);
    }
    iStreamStart=0;
    iStreamEnd=iStreamBuffer.Count()-1;
    audiofile.Close();

    Still the program is not giving a proper audio response.

    Is there any gross mistakes on following this procedure. Please help me to solve this problem. Any specific information if needed, please do ask.

    Thanking you all in anticipation,

    Waiting for your help,

    Yours truly,

    Arun S L

  6. #6
    Registered User
    Join Date
    Jun 2005
    Posts
    14
    hello, arun_sl:
    Can you show me the detail on how to use Libmad library? I have got the source of Libmad and compile it to DLL, but there is no document on how to use it? Can you do me a favor? Thank you very much!

  7. #7
    Registered User
    Join Date
    Mar 2005
    Location
    Hyderabad, India
    Posts
    19

    reply for foundwei

    Try assessing the function DecodeOneFrame() of Libmad to convert the Mp3 data. Basically you will be accessing functions of Libmad via a Mp3Decoder.h header file. Hope it solves your problem.

    Hopping to help you better,

    Your's Truly,
    Arun S L.

Posting Permissions

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