Exception while trying to play wav file
Hello,
Right now I'm experimenting the J2ME WTK on a Motorola A1000 (still taking my first steps). I'm trying to play a .wav file but I keep getting this error:
.... MediaException: SymbianOS error=-5: Not supported
I'm using the following midlet code:
Display display;
Alert alert;
Player player;
public Midlet3()
super();
display = Display.getDisplay(this);
alert = new Alert("MIDLET 3 - PLAYING MP3");
protected void startApp() throws MIDletStateChangeException
InputStream stream=null;
try
stream = getClass().getResourceAsStream("/newalert.wav");
player = Manager.createPlayer(stream, "audio/x-wav");
alert.setString("starting...");
display.setCurrent(alert);
player.realize();
alert.setString(player.getContentType());
display.setCurrent(alert);
Thread.sleep(1000);
player.prefetch();
alert.setString("going to play");
display.setCurrent(alert);
Thread.sleep(1000);
player.start();
....Am I doing something wrong? The .wav file is included in .jar file
Thanks in advance,
Paulo
Hi
So the wav file is included in a jar file which is in the resources directory of your application. Have you tried to put the wav file directly in the resources directory and see if it works?
Also, I think the order should be like this: player.prefetch();
player.realize();
player.start(); but I'm not sure if it is mandatory.
Mihai
Similar Messages
-
Exception while trying to write xml file
When I try to write my DOM tree to an XML file a get the following exception form the transformer.transform() function call:
Exception in thread "AWT-EventQueue-0" java.lang.AbstractMethodError: org.apache.crimson.tree.XmlDocument.getXmlStandalone()Z
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:373)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:662)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
at CentMon.ConfigRW.writeConfig(ConfigRW.java:77)
The whole thing worked for 2 years. I did not change anything on the code. the only difference is that i have now office 2007 installed instead of office 2003.
That's the code which generates the exception:
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
public void writeConfig(Document doc){
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer;
if (doc==null){
System.out.println("Document is null");
else{
try {
transformer = tFactory.newTransformer();
} catch (TransformerConfigurationException e) {
transformer = null;
System.out.println(e.getMessage());
DOMSource source = new DOMSource(doc);
StreamResult result = new StreamResult(new File(filename));
try {
if (transformer != null){
transformer.transform(source, result);
} catch (TransformerException ex) {
Logger.getLogger(ConfigRW.class.getName()).log(Level.SEVERE, null, ex);
}I am getting the exact same error when trying to write out an XML file. I have been following the J2EE Tutorial. Perhaps I need to look for a more recent tutorial.
Exception in thread "AWT-EventQueue-0" java.lang.AbstractMethodError: org.apache.crimson.tree.XmlDocument.getXmlStandalone()Z
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:373)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:662)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
at com.wordhopper.xml.DOMXMLParser.writeXMLFile(DOMXMLParser.java:55)
at com.wordhopper.gui.xmltool.XMLEditor.writeButtonActionPerformed(XMLEditor.java:217)
at com.wordhopper.gui.xmltool.XMLEditor.access$100(XMLEditor.java:13)
at com.wordhopper.gui.xmltool.XMLEditor$2.actionPerformed(XMLEditor.java:139)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6348)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6113)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) -
Itunes plays purchased HD videos fine, but constantly stalls while trying to play home created videos converted to the same file format and bit rate.
System specs
Win 7pro x64
ATI 5830
Phenom x6 1055t
8gigs ram
1tb 7200rpm sata hdd
500 gig 5400 rpm sata hddItunes plays purchased HD videos fine, but constantly stalls while trying to play home created videos converted to the same file format and bit rate.
System specs
Win 7pro x64
ATI 5830
Phenom x6 1055t
8gigs ram
1tb 7200rpm sata hdd
500 gig 5400 rpm sata hdd -
Can my muvo tx fm play WAV fil
my question is my problem and if it can what ccan i be doing wrong? plz im trying to get a song i really like but it wont show up on my mp3
well...i used to have an MuVo TX FM, and i know everything about it !! but now it's broken.
Anyway, it can play mp3, wma and wav files encoded only in a unique way !
but i don't think it can play wav files except in the recordings folder, but i don't really encourage that you play wav files in it !
you can convert wav to mp3 by any converter you get, or download, but for faster conversion use the creative mediasource, it's in any cd you get with any creative mp3 player !!!!
tell me if it works.
cheer to all !!!! -
# Question
I am using Firefox 3.6.13 and have installed Windows Media Player 1.0.0.8 for Firefox. However, if I attempt to open a file with a .wmv extension it appears to function properly, except, that I cannot "play" the file. What am I doing wrong?You probably have not seen anyone reporting the exact same problem as you. All three crash reports have the same crash signature and as currently ranked 67 it is not the commonest of reasons for a crash.
I hope you enter your email contact information when reporting crashes. I note you see this crash when using videos, others may possibly see this crash in other circumstances.
You have already tried the obvious, attempts at a fix so it is now down to wait and see, maybe developers working on the bug will report something or fix it.
Did you try my suggestion of installing portable ESR ?
For forum cross referencing purposes
* Crash Reports for Crash IDs <br />bp-71697f5d-41d4-48ae-9db9-3e6302130607<br /> bp-6e1347bc-153f-433a-9c35-a5f022130607<br /> bp-92a533a2-9e09-4c1e-8df7-deb4c2130607
*(all three) Crash Signature: EnumSoftwareMFTs(_GUID const&, unsigned int, __MIDL___MIDL_itf_mfobjects_0000_0006_0003 const*, __MIDL___MIDL_itf_mfobjects_0000_0006_0003 const*, IMFActivate***, unsigned int*)
* Related bug 858667 NEW crash in mozilla::wmf::MFTEnumEx @ EnumSoftwareMFTs
*I note this was first seen in Fx21 and is 100% Windows 7
<br /> -
How to Play .wav files in Safari?
Hi:
I need a little help.
I would like Safari to play wav files instead of downloading those file to my Downloads folder. Can this be done.
Thanks,
-AstraPointGreetings,
I would like Safari to play wav files instead of downloading those file to my Downloads folder.
Can this be done?
Maybe. First, what is the URL for a .wav file you're trying to play in Safari? I want to test this before I say whether or not it will work. -
Error Playing .wav file on RHEL 4 using JMF
Hi,
We are using jmf api to play wav files on our application deployed on rhel version 4. But we are receiving the following error
**"Cannot find a Processor for: myfolder/myAudio.wav" --->
this exception is comming from javax.media.Manager
throw new NoProcessorException("Cannot find a Processor for: " + source);"**.
Any ideas what could be issue with this, am I missing some drivers/processor for wav files? I did a default jmf studio installation.
Thanks and Regards
Vikram Pancholi
Edited by: vpancholi on Sep 8, 2009 8:51 AMIf we take a look at the supported formats page...
[http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/formats.html]
And the WAV file is supported by the cross-platform pack, AKA, jmf.jar.
If you're unable to open a WAV file, I'd say it's most likely because you don't have JMF.jar on your library path. You can fix that at runtime with the switch -djava.library.path=<whatever>
That's what I would say the issue is. -
Play WAV files into the .jar
Hello,
I'm doing small application Java with Netbeans.
I need is to play .wav file sounds are incorporated into the jar.
I do not want to use external libraries or external sound files, etc.. I want to go with my .JAR to the office, home, etc ... just need the JAR to hear the sounds.
I've created a folder "Sounds" in "src" and in that place I have my sounds. (Project / src / sounds). It's a way to incorporate a JAR file, or am I wrong?? Run independently of the sound files.
At the time of reproducing the sound I do the following:
Clip sonido = AudioSystem.getClip();
File f = new File(getClass().getResource(/Sonidos/alarma.wav).toURI());
sonido.open(AudioSystem.getAudioInputStream(f));
sonido.start();
If I run the program with netbeans, I play sounds, but which only transfer my .JAR to another computer, does not play ...
Any ideas?
Thank's.I don't understand, before I had done as you have written me, but did not work, but now it works.
Problem solved. Thank's.
Posting the code here:
InputStream path = getClass().getResourceAsStream("/Sonidos/alarma.wav");
try
sonido = AudioSystem.getClip();
sonido.open(AudioSystem.getAudioInputStream(path));
sonido.start();
}catch(Exception fail)
System.out.println(fail);
Edited by: 892291 on 19-oct-2011 10:37 -
hi all..
can i play '.wav' files using other than the AudioClip method?
how ever i have tried to use the method as below but it still isn't working..please help me out...thanksI had same problem,wouldn,t play waves convert to .au using goldwave(freeware... www.goldwave.com)then it will play
p. -
Pure Music player from Channel D software will not work when playing wav. files after updating to Lion OS. I can open the application as usual but after playing one song it will not advance to the next track either on its own or manually. The scrolling track name goes dim and I cannot get the play button to respond. Has anyone else experienced this problem?
RonThanks Limnos, but unfortunately the same error still remains.
The disk was OK. Permissions had errors along the lines of groups should be 0, is 80. I repaired that. Tried again to open, then reinstalled (new download again), but again the same problem.
I checked permissions again and some of the 0-80 errors came again, but no clear reason from there I think
Was also a SUID warning on ARDAgent but I see online that doesn't appear to be something abnormal.
I tried reloading Lion but the installation came back with software appears to have been tampered with (I think the dmg file is gone as I couldn't find it). I then went to email to report a problem so I could download again but of course that whole process doesn't work because itunes wont open.
So Stuck
if there is anything else I might be missing? -
Cmus doesn't play .wav files and pulseaudio isn't working properly
The first problem I noticed was that Chromium was using about 90% of my CPU while I wasn't connected to the internet. So I deleted Chromium because I couldn't fix the problem any other way. After deleting Chromium the CPU problem was fixed but after checking htop again I noticed this message with -11 being in red:
(http://pastie.org/4234521)
I started using cmus and noticed that .wav files aren't playing anymore but I am not sure if that has anything to do with this issue. Cmus played .wav files just fine when I had Chromium however. Also, RAM is steadily increasing at about 700 MB which never happened before. I think maybe the problem with cmus and the RAM increase could be caused by pulseaudio not working properly?
Also, when I run "pulseaudio" in the terminal I get this message in red:
$ pulseaudio
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
Last edited by rg_arc (2012-07-10 23:56:41)I have stopped using cmus and I am currently using moc(Music On Console). I found out that for some reason pulseaudio is taking up alot of RAM.
Here is a picture of what is going on in htop:
(http://i48.tinypic.com/1217mtk.jpg) -
Can not play wav file on envy touchsmart
can not play wav files from my emails on my hp envy touchsmart. have tried to download other apps, but nothing is working. help!
Hi terrylyn11,
What media player apps have you tried to use to play these files? Are other music file formats playing ok?
Please click the thumbs up button to say "Thanks!"
Clicking "Accept as Solution" on a reply that solves your problem makes it easier for other people to find solutions.
I am an HP employee. -
I thought the Style 100 could play .wav files !!
which is why I bought one!
!!! Just deli'vered. I've tried all the suggestions in the forum messages. None work.
I have used drag and drop into the music folder and the recordings folder. The files don't show up in the Zen folders although they are visible when I explore the Zen like a thumb dri've. What's up!!!
Your specifications say it plays .wav files thiis is apparently incorrect information. Creative Centrale does not recognize .wav files either.
Are you going to change the spec or provide support for playing .wav *as advertised?*
ThanksHi,
There are many different kinds of compression formats for wav files. The ZEN Style 00 supports IMA-ADPCM compression. Please check the compression format of your wav files. -
Blackberry 8330 - can't play wav files - Red X and "unknown error occured"
I have a client that started having an issue with her blackberry after we moved to BES Express 5.02. Her .wav file association on her computer was changed so she couldn't play .wav files on her PC. Then she stated getting a red X on her phone when trying to listen to the Cisco unity voice mail messages that are attached to emails.
I was able to correct the issue on her PC by re-associating the .wav file with windows media player. However on the blackberry, the .wav file still will not play. Is there a file association section on a blackberry device? If not what else might be the issue? she is the only person having the issue. I don't use a blackberry so i don't know the menu options very well.
Thanks
Steve.
P.S.
Oh, The phone was factory reset before being added to the new BES, Service books and IT policy Applied correctly. I could pull the phoen and reset it again but I don't know if that would correct the issue.Hi - I am now having this same exact problem on my Mac laptop. I have many Breaking Bad, etc TV shows that I purchased through itunes & have watched over the years & now all of those, as well as, any new shows I purchase will not play on my laptop. Just same as above person -- a black screen that appears to be playing movie (the timer is actually playing) but no video or sound. Shows / Movies all work fine on my home computer.
On my laptop it keeps saying .. "Not authorized to play .... & then says "Sign into Itunes.. " - but I do sign out & sign back in & still nothing happens. Very annoying and frustrating as I can ususlly figure things out with perserverence and trial & error. -
Error message while trying to play rented moves on Apple TV
I keep getting an error message while trying to play my rented movies. I have rebooted the Apple TV. Lowered the resolution. Restated my modem . Rest my Apple TV. Soft rebooted it and it plays all Netflix and previews in HD no problem just not the movies I have rented !! Extremely frustrated regretting my purchase extremely!! About ready to boycott!
I have been able to open a few items in iTunes, but have not been able to play even those videos from my Apple TV. I can airplay them from the computer, but cannot access them directly from Apple TV. This is a bit frustrating.
Maybe you are looking for
-
I don't have a clue what I am doing with this. Here is my discussion with Customer Service: Naresh: Hello! Welcome to Adobe Customer Service. Naresh: Hi Mary. Naresh: I understand you have been getting invalid serial number, am I right? Mary Vance:
-
The following error comes up when I try to install the updated Firefox: "The operation can't be completed because some items had to be skipped. For each item, choose File > Get Info, make sure "Locked" is deselected, and then check the Sharing & Perm
-
How to generate as XML output from Oracle Apps 11
Hi Anyone has the experience to generate the output from Oracle Apps 11 as XML file? Database is 8.1.7, Oracle Apps 11. The concurrent program can be written in PL/SQL or can report 2.5 generate the output as XML? The scenario is: 1) Run a concurrent
-
Flash SWF (with as3 code) integrate in Flex probelm
Hello everyone, I'm having a problem to make my Flash SWF working in Flex. I created an animation movieclip, made a button and wrote a script to play this movieclip in Flash. Everything works fine but when I use SWFLoader in Flex to integrate this SW
-
Hi all, I have created an ALV Grid display using container. My question is : How to edit an AlV. Initially some of column are in Display Mode, That i had set as non editable. But i want that when i create new/insert new record using the Insert button