This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Java in General and the fly likes Saving sound as byte array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

Saving sound as byte array

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 750
Hi I posted this question in the I/O streams section, but there was little response, and I have a little more info now:

I've ommitted try/catch blocks for clarity,
I am able to play a sound using...

Now, I can turn the file into bytes using..

So what I would like to do is play a sound given a byte[]
I attempted this..., but it threw an Exception

But AudioStram as=new AudioStream(is); throws an exception with message
-> "could not create audio stream from input stream"

Is there any way to solve this?
Thanks for any help
I agree. Here's the link:
subject: Saving sound as byte array
It's not a secret anymore!