Play sounds of media on a certain event? "Error: javax.microedition.media.MediaException: no support type.
Hello, I'm trying to play MP3 files.
Example, if the answer is just play then "sound1.mp3 '...
However, I get this error: "" javax.microedition.media.MediaException: unsupported type of «»
Although I read that mp3 files are supported.
I used this tutorial " http://docs.blackberry.com/en/developers/deliverables/17968/CS_Playing_audio_in_a_BB_device_app_1222... ".
Note: I use Blackberry JDE 5.
This is the code that I have actually used (has not changed anything core):
Try
{
Player p = javax.microedition.media.Manager.createPlayer ("C:/Documents and Settings/User/space work/celebrity/res/sounds/RoundStart");
p.Realize ();
VolumeControl volume = (VolumeControl) p.getControl ("VolumeControl");
volume.setLevel (30);
p.prefetch ();
p.Start ();
}
catch(MediaException me)
{
Dialog.Alert(me.) ToString());
System.out.println ("Error:" + me.toString ());
}
catch (IOException ioe)
{
Dialog.Alert (ioe. ToString());
System.out.println ("Error:" + ioe.toString ());
}
------------------
Thanks for the help in advance
If you want to reference audio files in your application, the above will not work. You must code differently.
try something like this
Class cl = Class.forName(replace_this_with_your: packageName.classname); //
InputStream is = cl.getResourceAsStream("/somesound.mp3");
Create an instance of the reader of the InputStream
p = Manager.createPlayer (that is, "audio/mp3");
Tags: BlackBerry Developers
Similar Questions
-
its library files stop playing sound
Why my Media Player plays a song for a few seconds and then sound stops but continues to play the song. (the bar at the bottom of the window that shows continuous progress to go as if it was when he played sound)
Hello
· You get an error message when the audio stops playing?
· Since when are you facing this problem?
Method 1:
See also the link below to run the fix to fix common problems with audio in windows vista:
http://support.Microsoft.com/mats/NO_SOUND/
Method 2:
If the problem persists only with Windows Media Player, then you can try to uninstall and reinstall Windows Media Player, to do this follow the steps in the link below:
http://Windows.Microsoft.com/en-us/Windows7/turn-Windows-features-on-or-off
Method 3:
You can also try to update the audio drivers for your system and check if it helps resolve the issue.
For more information on updates to the drivers, please refer to the link below:
http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly
Thank you, and in what concerns:
Naman R - Microsoft technical support.Visit our Microsoft answers feedback Forum and let us know what you think.
-
Windows Movie Maker does sound on certain songs (MP3), but they play fine in Media Player. I created a movie in movie maker. Imported (MP3) songs bought online. Play all songs on Windows Media Player, but once imported into movie maker, only some play. I adjusted the volume on every song with no positive results. Please help :)
Windows Movie Maker does sound on certain songs (MP3), but they play fine in Media Player. I created a movie in movie maker. Imported (MP3) songs bought online. Play all songs on Windows Media Player, but once imported into movie maker, only some play. I adjusted the volume on every song with no positive results. Please help :)
====================================
Just because a media file plays in Windows Media Player
does not ensure that it is compatible with Movie Maker.In fact... Movie Maker has problems with MP3 files... better
bet would be to convert the files to the .wma format before
import into Movie Maker.The following freeware program can perform the conversion:
(FWIW... it's always a good idea to create a system)
Restore point before installing software or updates)Format Factory
http://www.pcfreetime.com/
(FWIW... you can uncheck
all the boxes on the last screen)After downloading and installing Format Factory...
Open the program and choose an output folder...
(this is where you will find your files when they are
converted)Drag and drop your clips of music on the main screen...
Select "At?" / OK...
(the? is the format of your choice)Click on... Beginning... in the toolbar...
That should do it...
Good luck...
John Inzer - MS - MVP - digital media experience
-
Media Player
I have just updated to Windows Media Player 11. I have a .avi file that only plays sound with no video. I'll see a message asking me to information center to display information about the file being played. Thank youDownload codecs here: -.
http://www.DivX.com/en/software/DivX-plus/Codec-PackOtherwise, you can download and install VLC: -.
http://www.videolan.org/VLC/download-Windows.html -
No video is coming, but only sound, when I play in windows Media Player 11, os is xp
Hi james_pl1973,-Is this type of specific file to some issue or is it the same with all types of files?-You get an error message or error code trying to watch the video for files?It is likely that the codec is correct / encoder is not installed or is installed but has been corrupted by another program.
A codec is a software to compress or decompress a digital media file, such as a song or a video. Windows Media Player and other programs use codecs to play and create digital media files.
A codec can consist of two components: an encoder and a decoder. The encoder performs the compression function (coding) and the decoder performs the decompression function (decoding). Some codecs include both components and some codecs only one of them.
For example, when you rip a song from an audio CD on your computer, the player uses Windows Media Audio default codec to compress the song into a compact WMA file. When you play that WMA file (or any WMA file that may be broadcast from a Web site), the player uses the Windows Media Audio codec to decompress the file for music can be played through your speakers.
Follow the steps listed in the article given below to resolve this issue.
-
AVI video files play sound but no video in Windows Media Player 7
My video files avi play sound but no video in Windows Media Player 7. Video files avi are since 2002 and has played very well until I'm a new PC with Windows 7 so I know that the files are not corrupt. All my other files and videos play fine in Media Player. I checked online and seen the posts in other forums on the codecs being the problem. Does anyone know how to fix this? Based on the other forums I found it seems that it is not uncommon that a problem with Win7.
Also, is it possible to convert audio and video files in different formats with Media Player? Or do I need any other software to do this?
My video files avi play sound but no video in Windows Media Player 7. Video files avi are since 2002 and has played very well until I'm a new PC with Windows 7 so I know that the files are not corrupt. All my other files and videos play fine in Media Player. I checked online and seen the posts in other forums on the codecs being the problem. Does anyone know how to fix this? Based on the other forums I found it seems that it is not uncommon that a problem with Win7.
Also, is it possible to convert audio and video files in different formats with Media Player? Or do I need any other software to do this?
It is not that there is a problem in Windows 7, it is more likely that you don't have just the installed CODEC the video file is saved with. You will need to find a source, download and install any CODEC no MS yourself. You can use GSpot to identify CODECs used in AVI files. An alternative to downloading of many individual CODECs is to install FFDSHOW instead. Some media players like VLC and Media Player Classic also have internal CODECS and support for a wide variety of video and audio file types.
-
MPG video plays but no sound - in Media Player 12
I have files s.o. that play video, but with sound in my new Windows 7 PC with wmp 12. Strange thing is that files play without this problem in Windows Media Center and in the Sony Vegas Studio software I have installed. DVD play so I know that I have a DVD codec.
While I have workarounds, it's frustrating. How can I have it working fine in my previous machines and not in the more recent and Win7 and wmp12?
Hi Scphoto,
(a) who is the manufacturer of the audio device?
(b) only update you the latest audio drivers on your computer?Download the latest codec from the Microsoft Web site and search for the issue. Now, you download the latest codec for media player from the Microsoft Web site and install it on your computer, to visit the link below.
For more information on the types of files supported by Windows Media Player, you can also view the following link: information on the types of media files that supports Windows Media Player
http://support.Microsoft.com/kb/316992Go to the computer manufacturer's website and download the latest sound card driver.
If it still does not work, try re-installing the driver of sound card as below:
Reinstall the driver
==============
1. click the Start button, type "devmgmt.msc" (without the quotes) in the search box and press ENTER.
2. double-click to develop of "audio, video, and game controllers.
3. right click your sound card, and then click on uninstall.
4. check the box "delete the software driver for this device", click OK.
5 restart the computer.
Thank you, and in what concerns:
Shalini Surana - Microsoft technical support.
Visit our Microsoft answers feedback Forumand let us know what you think. -
in question .mpg files use the audio codec of arcsoft. These same files play with sound on wmp 11 Vista ultimate on another machine. Both have total media 3.5 installed.
These .mpg files also do not play in the computer of windows 7 using win 7 media center or film maker.
WMP 12 shows that the arcsoft audio codec is installed.
In addition, some .mpg files created by ArcSoft show no video or audio in wmp 12, but work correctly on vista with wmp 11 system.
a noticeable difference in technical support for windows media information is the presence of Microsoft MPEG-1hd Audio decoder under the mpeg/dvd filters in the list for wmp11 but not wmp12. I am unable to find this codec for installation.
any suggestions on how to find sound would be greatly appreciated. Thank you.
Addendum: other mpg which were extracted independently of Arcsoft files also do not play sound in wmp 12. The property indicates the same audio codec association of arcsoft. Tried to uninstall and install the window media components but no change.
Thank you!
I had the same problem one solved it just by setting filter audio decoder arcsoft merit for 0 x 600000 with Gspot.
JDCR
-
AVCHD (.) MTS video) shot in sony camera do not play sound in windows media player. Help, please
I've converted these videos to .mp4, avi and wmv formats and get her. but the problem is that when I change it (trim) in windows movie maker and save it don't get no video but sound only. my pc is windows 7 32-bit basic family. someone can really help meThank youJubinSorry, I read the first line and the title, the ' AVCHD (.)» MTS video) shot in sony camera do not play sound in windows media player. Please help' and misread the rest.
United Nations marks my post as being the answer or people focus may not be on a position of answers.
-
Media Player 11 plays sound but no video dvd XP OS
I have the nvidia decoder installed, but when I try to play a DVD I'm unable to see the video. Plays sound, but no video. I'm on Windows XP OS
Hi Jen,
seems that all codecs are not installed (normally you should not have to pay for a codec, I would check and make sure that no other only files where installed) done everything, try this:
http://www.Microsoft.com/download/en/details.aspx?displaylang=en&ID=507
hope this helps,
Eddie B. -
I have no audio problem with my browser, but I tried to play mp3 and mp4 files in two media players and or play sounds on a file type. I ran fix on this page http://support.microsoft.com/mats/audioplayback, but he has found no problem. One of the media players does not appear in the volume mixer, but the other is certainly not cut. There is no green and gray bar fluctuating under the speakers/headphones section for each player, because when I play audio in a browser. I just reinstalled Vista and downloaded and installed all updates. What could be the problem?
I found the solution here http://answers.microsoft.com/en-us/windows/forum/windows_vista-pictures/no-sound-through-any-media-player/26ba4c61-d03b-46cc-8bbf-e88225cf8e51. Not sure how I have not found that I originally posted.
-
Firefox does not play sound in any HTML5 player.
When trying to play any sample of any album sold in Bandcamp.com the player starts to play, but there is no sound. Meanwhile, other browsers it plays very well.
I use the last FF, I tried to disable various addons and plugins, but it did not help (they are not sound related in any case).
I run on Win8x64.
Update: the sound plays very well everywhere else on Firefox. YouTube, etc. He plays everywhere except Bandcamp.
And the Bandcamp player is not Flash, it has nothing but associated with Flash. It's the HTML5 player.
SOLVED
Finally, after hundreds of hours I fixed it and Firefox plays sound in HTML5, YouTube (HTML5 mode), SoundCloud, Bandcamp and etc.
It takes: right click on your speaker icon / in the system tray and select playback devices, go to properties of speakers (one that is green-checked, also turn off the reds, as appropriate), then go to improvements and check Disable all sound effects. And that of it, restart the browser and enjoy.
In short: Volume mixer-> peripheral reading-> reading tab-> properties-> improvements speakers-> disable all sound effects-> restart of the browser.
I use latest stable Firefox 23.0.1 on Windows 8 x 64 (but Firefox is 32-bit).
In addition, if didn't need help, make sure that you have media.windows - media - foundation.enabled value 'true' about: config.
You should also have a few decent codecs installed on your machine, I have VLC Player and it comes with lots of built-in codecs. Also make sure you have VLC Web Plugin active in Add-ons-> Extensions (always activate)
So the answer is which a problem is who? Is Firefox? Or Windows 8? Or my fault of Realtek audio drivers? (In any case without disabling sound effects, HTML5 works fine in another browser, so I blame this nonsense for additional configurations in the audio settings of Windows with Firefox)
So pretty much it.
See you soon,.
rhazor -
Can not play music in media center 2004 on Satellite P15-S470
Hello
Last weekend, I upgraded Windows XP Media Center SP1 to SP2 (because MS no longer supports it) on laptop Toshiba Satellite P15-S470 to my father. Tonight, I found that his Media Center 2004 refuses to read audio CDs audio error: "To play music in media center, install Windows Media Player 9 or a repair."
After a long search on the Internet (e.g., newsgroups and forums), I found this a known issue since the release of SP2 in 2004. He worked before SP2 and other music players (for example, Windows Media Player (WMP) v10 and iTunes v6.x) have no problem. I tried to use Registry MCE 2004 provided by Toshiba and HP fixes (just for fun) and restart, but they did not help.
Is there anything else to try next to the clean installation of SP2 and the BONE with its software? I was about to update WMP to v11, but I discovered that it does not work in MCE 2004. :(
Thank you in advance. :)
Hello
You have this problem its just at the point where you use WMC to listen to the music CD or also with other players?
Is there any problem, indicated in the device (sound card) Manager?
-
Internet Explorer will not play sound with no explanation that I can find. Help
I am running Windows 7 with I think it's Internet Explorer 8.
I had my IE under Mixer volume muted during last week and discovered he won't play no sound now when I disabled the program. For all purposes, the volume mixer shows that it play a sound. All my other programs play sound, system sounds are correct, just like the games.
After reviewing the responses to other messages here, that's what I tried without success.
Volume mixer IE is not set to mute, nor is another program.
Checked under the tools/advanced/multimedia, and ensured that the audio check box was selected: it is.
I run cmd.exe under administrator rights and put in the sfc/scannow
This can 100% complete and it 'not found any breach of integrity.
I tried to run IE with no Add-ons - however, I could not find a program that would make it sound.
My antivirus has completed a quick scan with no self-esteem.
I'm still running my antivirus as a full sweep, however, I'm hesitant... to wait until it yeilds it is result.
Help?
Hello
Method 1:
Maybe you don't have the right plugins/addons installed to play sounds. Need of plugins for interactive media include generally:
(a) Adobe Flash.
b) Java.
To install these plugins, open Internet Explorer and visit the links above. Follow the instructions on the pages listed. After installing these plugins and restart Internet Explorer and check to see if you hear the sound?
Method 2:
I suggest you update the audio drivers on the manufacturer's Web site see the link below:
Method 3: Also suggest that you click on the link below to reset Internet Explorer settings and check if the problem still persists. http://support.Microsoft.com/kb/923737
Warning: resetting the Internet Explorer settings is not reversible. After a reset, all previous settings are lost and cannot be recovered.
Hope this helps,
-
Play sounds in the order using MediaPlayer
Hello. How to play sounds in order?
For now, here are my code.
I have a MediaPlayer component as an attached object
http://developer.BlackBerry.com/native/reference/Cascades/bb__multimedia__mediaplayer.html
attachedObjects :[ MediaPlayer{ id: sound sourceUrl: "asset:///sounds/sound1.mp3" } ]
Then I have a button. Here is what my code for it
Button{ id: play text: "Play Sequence" onClicked :{ sound.sourceUrl = "asset:///sounds/sound1.mp3" sound.play(); sound.sourceUrl = "asset:///sounds/sound2.mp3" sound.play(); sound.sourceUrl = "asset:///sounds/sound3.mp3" sound.play(); } }
What goes wrong.
The code runs after 1 second about, cut the next sound. I'm doing his next game, after the end of his previous.
The sounds are not finished because play() is not a call blocking. Once you call the play() function it will start playing the sound and return immediately to the following line of code in the QML. If the next line is a call to the play() still it will have precedence over previous sound, i.e. If you think logically about what you need in an application, you would not have the sound of a doorbell 2 seconds later, play just because you play already a sound, you would stop, as it does.
My suggestion to use a selection intended to use the MediaPlayer playlist function, that you implemented will obviously suffer from the same problem for the above reason. A playlist is a separate file that contains a list of media you want to play and can be in different formats.
My other suggestion of using onPlaybackCompleted does not seem to have been followed by you, but is probably the easiest to implement.
MediaPlayer { id: mediaPlayer onPlaybackCompleted: { count = count + 1; var s = count; mediaPlayer.setSourceUrl("asset:///sounds/sound" + s + ".mp3"); mediaPlayer.play(); } }
Where count is a comprehensive, defined property to 1 in your QML file and you have some relaxation (onCreationCompleted or clicking a button) to start the first play().
Maybe you are looking for
-
HP ENVY Phoenix 850-065se: HP ENVY Phoenix 850-065se Power Supply replacement Question
On point to start using my new 850se and, like others, have long-term supply concerns with the unit from 500W to come with this model. Finally the PSU will have to be dealt with during the upgrade or this power will die quickly. I thought I could ju
-
T135 with Avantalk bluetooth headset
Hello I managed to use bluetooth Manager for my phone but I have bluetooth headset and I don't know why the computer does not detect them. I have the latest version of battery v8.00.12I found a fix in your download page, but could not install it, I g
-
Hard drive does not meet the system controls
bad sectors on hard drive
-
Have tried many suggestions, NO LUCK. THE FOLLOWING MESSAGE has an EFFECT ON BEING NOT ABLE TO UPDATE? "Inbound connections that do not match a rule are blocked." > What is the problem and how to correct you? Greatly appreciated all the answers. Than
-
I use the recovery disks, restore the Visat OS on a dell laptop. After the OS system, it displays the screen that requires the user name and password. I can change the image associated with the user name, I can move the box around the screen, but i