knowledge-database (beta)

Current group: comp.speech.research

Java Sound Classes, anyone?

Java Sound Classes, anyone?  
R W
 Re: Java Sound Classes, anyone?  
mozart
 Re: Java Sound Classes, anyone?  
Yu SONG
From:R W
Subject:Java Sound Classes, anyone?
Date:13 Jan 2005 11:12:21 -0800
I am writing some code that includes the capability to play sound.
After reading many tutorials I have some interesting stuff working.
However, we tried changing a file recorded in a slightly different
format for the original file used in the demo I copied from and it gave
a javax.sound.sampled.UnsupportedAudioFileException that said that it
only supported 44100 kHz, 16 bit, mono, Windows PCM format audio. Why
is that? I thought javax.sound.sampled was supposed to support several
variations. At least, that's what it seems to say in the javadocs.
There is a getFormat method that tells you about the format, so I would
assume that you could set it to play various formats. How do you do
that?

Also, what could I use to play a VOX file? Thanks to whoever is a java
sound guru.

Rebecca
From:mozart
Subject:Re: Java Sound Classes, anyone?
Date:Sun, 16 Jan 2005 12:17:09 -0700
So far as I know,
although Java Sound supports various formats ( you can load them into
AudioInputStream),
it can only play PCM wav file. So after you load the sound file into a
AudioInputStream
in other format other than PCM, you need to convert the stream into PCM
format in order to
playback it.

-Min

"R W" wrote in message
news:1105643541.172753.151470@z14g2000cwz.googlegroups.com...
> I am writing some code that includes the capability to play sound.
> After reading many tutorials I have some interesting stuff working.
> However, we tried changing a file recorded in a slightly different
> format for the original file used in the demo I copied from and it gave
> a javax.sound.sampled.UnsupportedAudioFileException that said that it
> only supported 44100 kHz, 16 bit, mono, Windows PCM format audio. Why
> is that? I thought javax.sound.sampled was supposed to support several
> variations. At least, that's what it seems to say in the javadocs.
> There is a getFormat method that tells you about the format, so I would
> assume that you could set it to play various formats. How do you do
> that?
>
> Also, what could I use to play a VOX file? Thanks to whoever is a java
> sound guru.
>
> Rebecca
>
From:Yu SONG
Subject:Re: Java Sound Classes, anyone?
Date:Fri, 14 Jan 2005 11:57:56 +0000
R W wrote:
> I am writing some code that includes the capability to play sound.
> After reading many tutorials I have some interesting stuff working.
> However, we tried changing a file recorded in a slightly different
> format for the original file used in the demo I copied from and it gave
> a javax.sound.sampled.UnsupportedAudioFileException that said that it
> only supported 44100 kHz, 16 bit, mono, Windows PCM format audio. Why
> is that? I thought javax.sound.sampled was supposed to support several
> variations. At least, that's what it seems to say in the javadocs.
> There is a getFormat method that tells you about the format, so I would
> assume that you could set it to play various formats. How do you do
> that?
>
> Also, what could I use to play a VOX file? Thanks to whoever is a java
> sound guru.
>
> Rebecca
>

Java Sound has build-in support for au, wave and etc. , therefore, it
can only identify these formats.

For other formats, you need to get it done by yourself. There are some
examples at:
www.jsresources.org


I’m not familiar with VOX, sorry for that.

--
Song

/* E-mail.c */
#define User "Yu.Song"
#define At '@'
#define Warwick "warwick.ac.uk"
int main() {
printf("Yu Song's E-mail: %s%c%s", User, At, Warwick);
return 0;}

Further Info. : http://www.dcs.warwick.ac.uk/~esubbn/
_______________________________________________________
   

Copyright © 2006 knowledge-database   -   All rights reserved