Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha

MediaPlayer::prepare: Error attaching input source

MediaPlayer m_Player(this);
m_Player.setSourceUrl(QString("asset:///sounds/").arg("test.wav"));
m_Player.prepare();
m_Player.play();

 

Anyone has any idea on Beta 4?

 

 

Developer
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha

Re: MediaPlayer::prepare: Error attaching input source

[ Edited ]

I am sure I checked all the permissions in the bar file

 

And I have tried using fall path of the sound file.

Developer
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha

Re: MediaPlayer::prepare: Error attaching input source

[ Edited ]

I found I only call 

setSourceUrl once, but it will show twice in the Device log

 

MediaPlayer::setSourceUrl: url=QUrl("/accounts/1000/appdata/xxx.testDev_s_drivewyze4a52578f/app/native/assets/sounds/test.wav")

 

MediaPlayer::setSourceUrl: url=QUrl("/accounts/1000/appdata/xxx.testDev_s_drivewyze4a52578f/app/native/assets/sounds/test.wav")

 

MediaPlayer::smileytongue:repare: Error attaching input source. url="file:///accounts/1000/appdata/xxx.testDev_s_drivewyze4a52578f/app/native/assets/sounds/test.wav", error=Internal

New Contributor
Posts: 3
Registered: ‎12-01-2012
My Device: None, BB10 Simulator at least while BB10 is not released.

Re: MediaPlayer::prepare: Error attaching input source

I noticed similar issue. Everything was fine with beta 3, but now on Simulator I'm always getting this 'internal error'. Code is pretty simple:

 

                    media.setSourceUrl( source );
                    media.play()

 and a error:

 

MediaPlayer::smileytongue:repare: Error attaching input source. url="file:///<full_path_to_media_file>", error=Internal

 

Does anyone now a solution (except switching on your own  sound manager like it's done in a PullMyBeard example :smileywink: )?

Developer
Posts: 238
Registered: ‎12-26-2010
My Device: BlackBerry Z10

Re: MediaPlayer::prepare: Error attaching input source

Is it the problem with the BETA4 SDK or the new OS?

www.jackdevora.com
Developer
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha

Re: MediaPlayer::prepare: Error attaching input source

It works good in Beta3, but error on Beta 4.

Developer
Posts: 101
Registered: ‎12-02-2012
My Device: Z10 LE, PlayBook 32GB

Re: MediaPlayer::prepare: Error attaching input source

I have similar issue with BETA4 SDK in Simulator


My BB10 apps: Photo Memo | TriQuick | SkidStone | MeeBirthdays
If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post.
Developer
Posts: 304
Registered: ‎08-14-2012
My Device: PlayBook, Z10, Dev C

Re: MediaPlayer::prepare: Error attaching input source

[ Edited ]

does media player and foreign windows work in sim beta 4 im having problems loading it also. 

 

**update** it loads now but when trying to play nothing happens . i also cant play systemsounds sample either.

BlackBerry 10 game reviews for the unknown, small and indie developers. Little games with big dreams. VeryBerryGames.com | Follow @VeryBerryGames | TwoCasualCoders.com | never casual on quality
New Contributor
Posts: 3
Registered: ‎12-01-2012
My Device: None, BB10 Simulator at least while BB10 is not released.

Re: MediaPlayer::prepare: Error attaching input source

Looks like a problem with Beta4 SDK. I've tried it on the dev alpha device and it was working fine (I can here all sounds, no errors in the logs, etc.). So, probably something is wrong only in the simulator.
Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB

Re: MediaPlayer::prepare: Error attaching input source

Simulator issue. Neither c++ nor qml media-player sample works on sim :smileysad: