This is a discussion on Symbian C++ Mp3 Streaming within the Symbian forums, part of the Mobile Software Development category; Hi, I want to play streamed mp3 in my S60 2nd edition phones like N70 and 3230. I am using ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, I want to play streamed mp3 in my S60 2nd edition phones like N70 and 3230. I am using CMdaAudioOutputStream class. since in s60 2.1 phones,using this Api I can only play PCM data, I need to convert the mp3 data received from the network into pcm data. since this devices have and inbuilt MP3 decoder can i use the decoder to decode my mp3 data frame by frame? Using CMMFCodec once i succesfully converted from ARM to PCM using the ProcessL function. Can I use the framework to convert mp3 to PCM buffer by buffer using CMMFCodec::NewL(KMMFFourCCCodeMP3, KMMFFourCCCodePCM16) Or do I need to use a decoder like madlib. Ya in devices below S60 V2.1 Mp3 decoders are not available and I need to use a decoder. regards, |
| Sponsored Links |
| |||
| not sure if this fit your requirements, but have you looked into the Nokia's open source internet radio project. It is infact playing MP3/AAC coded streams, and AFAIK the streaming engine implementation would also be free. |
| |||
| hi, I have seen the Nokia internet Radio project. But its basically for phones with 2nd edition FP2 and above which can directly play MP3 and AAC formats. |
| |||
| Hi, I am able to use the inbuilt mp3 decoder in 3230. using CMMFCodec::NewL(KMMFFourCCCodeMP3, KMMFFourCCCodePCM16) but there are lots of issues. I am able to decode the mp3 buffer to PCM16. I have taken the source and destination as a pointer to 8 bit descritor TDes8* and passing the destination buffer to WriteL function of output stream I played a mp3 file with bitrate of 24kbps,stero and with audio sample rate of 11 Khz by reading little by little from a file and passing it to CMdaAudioOutputStream. The setting I used for the stream was ESampleRate16000Hz Mono. The music played fine but was bit too slow may be because I was playing stereo. But the probelm is that the stream only supports ESampleRate16000Hz Mono and ESampleRate8000Hz Mono If I specify any other sample rate the following line fails with NotSupported error. Stereo is not supported at all. iOutputStream->SetAudioPropertiesL(iSetting.iSampleRate, iSetting.iChannels); why does it supports only two sample rate and thats too not stereo? This devices have inbuilt mp3 decoder. So why cant we adjust the settings. because if I am decoding mp3 of various sample rate I cant play them satisfactorily with just ESampleRate16000Hz Mono. |
| |||
| hi, plz provide some clue whether we can use the in built codec in S60 2.1 phones through CMMFCodec. I have used it and it works but dont know how to configure the codec. Or do I need to use a third party software codec? regards |
| |||
| Hi, I am able to use the configureL function of the default mp3 codec but not to much success. I used something like this, RArray<TInt> configParams; configParams.Append(1); configParams.Append(0); configParams.Append(0); configParams.Append(0); configParams.Append(0); configParams.Append(0) TUid codecId = TUid::Uid(KMmfUidControllerAudio); iOCodec2->ConfigureL(codecId, (TDesC8&) configParams); There are 6 parameters needed. If I give anything less than that it gives array out of bond index panic. Initially without configuring the decoder when i played a 11KHz mp3 song by decoding buffer by buffer and setting the output stream settings to 16KHz mono my song was too slow. But when I used the above setting the playing of song was bit too fast. I dont know what these 6 parameters correspond to. I want to adjust these 6 parameters in such a way that it gives me 16KHz mono 16bit PCM sample for all my mp3 input. I havent come across any documentation about this. regards, |
| |||
| The solution for your problem.. Code: RArray<TInt> configParams; // This setup converts audio to 16000Hz 16 bit mono PCM configParams.Append(1); // stereo to mono switch (TRUE(1) or default FALSE(0)) configParams.Append(0); // decode left or right channel (1 left, 2 right, 0 default all) configParams.Append(1); // decimation factor (2, 4 or default 1) configParams.Append(1); // error concealment level (0 none, default 1) configParams.Append(16); // resolution of PCM samples (default 16 bits) configParams.Append(16000); //Output sampling frequency TUid codecId = TUid::Uid(KMmfUidControllerAudio); iOCodec2->ConfigureL(codecId, (TDesC8&) configParams); Hope this helps ![]()
__________________ H2O Without us, no one can survive.. |
| |||
| It worked well. regards, |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to programmatically set the wallpaper of Symbian s60 ? | itbarota | Mobile Software Development | 2 | 08-06-2007 08:19 AM |
| How to format a Symbian Phone | itbarota | Mobile Software Development | 3 | 08-06-2007 07:56 AM |
| What is the method for streaming transmission? | H2o | Other Web Programming Languages | 1 | 07-20-2007 01:47 AM |
| video streaming | nssukumar | Flash Actionscript Programming | 1 | 07-16-2007 06:53 AM |
| Info on Streaming | Jeyaseelansarc | Server Management | 0 | 05-18-2007 01:48 AM |