Hello,
As describe bellow, The call to the mediaplayer with a wave file as an argument does not work. Some body has an idea?
_LIT( KArg,"c:\\Data\\Sounds\\play.wav");
_LIT( med,"mediaplayer.exe");
processHandle.Create(med,KArg)
Hello,
As describe bellow, The call to the mediaplayer with a wave file as an argument does not work. Some body has an idea?
_LIT( KArg,"c:\\Data\\Sounds\\play.wav");
_LIT( med,"mediaplayer.exe");
processHandle.Create(med,KArg)
What about trying RApaLsSession instead ?
Hello,
by an after (150000), I see realplayer run and finished by error. So the problem is a problem crossing the argument "play.wav.
Do you know how?
Thank you.
My code:
_LIT( KArg,"c:\\Data\\Sounds\\play.wav");
_LIT( med,"mediaplayer.exe");
Process server;
CleanupClosePushL(server);
User::LeaveIfError(server.Create(med,KArg));
server.SetPriority(EPriorityBackground);
server.Resume();
console->Write(_L("juste avant le after!\n"));
User::After(150000000);
CleanupStack::PopAndDestroy
Should it work? Have you seen it somewhere, or just found out that you try this way?
Check CDocumentHandler::OpenFileEmbeddedL() method to play file in player.
hello,
generally I try the code found it in the net.
I change the way as:
_LIT( KArg,"c:\\Data\\Sounds\\play.wav");
CDocumentHandler *iDocHandler= CDocumentHandler::NewL((CEikProcess*)CEikonEnv::Static()->Process());;
TDataType dataType(_L8("audio/wav"));
TRAPD( ERR, iDocHandler->OpenFileEmbeddedL(KArg,dataType) );
at all, No sound under emulator.
Check this Wiki article: http://wiki.forum.nokia.com/index.ph...ocumentHandler
And test it on real device.
Nokia Developer Wiki Moderation team
I go back. I've already managed to run mediaplayer by two ways:
_LIT( KArg,"c:\\Data\\Sounds\\play.wav");
_LIT( med,"mediaplayer.exe");
1. First
RProcess server;
CleanupClosePushL(server);
User::LeaveIfError(server.Create(med,KArg));
server.SetPriority(EPriorityBackground);
server.Resume();
2. Second
TInt err2 =User::LeaveIfError(processHandle.Create(med,KArg));
if (err2 == KErrNone)
{
processHandle.Resume();
processHandle.Close();
}
else console->Write(_L("erreur d execution de mediaplayer!\n"));
I just had the problem of passing of a file argument (play.wav) in command line mode.
In your opinion, it is impossible to do it or no documentation for this topic?...
Actually you can freely check the source code, it is pretty probable that searching for mediaplayer.exe will directly bring you to its .mmp file, and the implementation should be near to it. http://developer.symbian.org, Source/Browse code, Search OSS code.
Then you will see if it accepts command line arguments, and if any special things has to be applied (like the magic '4' was in the old 'Services' browser - e.g. it had to be invoked with "4 http://xy" for opening a page).