File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes 8bit to 16bit conversion. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "8bit to 16bit conversion." Watch "8bit to 16bit conversion." New topic
Author

8bit to 16bit conversion.

Rajitha Gunawardhane
Greenhorn

Joined: Dec 11, 2007
Posts: 28
Hi All,

I want to convert an 8bit file to 16bit.

Can any one show me a way.

Thanks
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 960
    
  10

Rajitha Gunawardhane wrote:
I want to convert an 8bit file to 16bit.


I don't understand what you are asking. Can you explain what you mean by a 16 bit file.
Rajitha Gunawardhane
Greenhorn

Joined: Dec 11, 2007
Posts: 28
Thank you for the quick reply.

I wanted to convert an 8bit wav file to 16bit file.

Thank you.
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 960
    
  10

Rajitha Gunawardhane wrote:
I wanted to convert an 8bit wav file to 16bit file.


Not trivial but can be done using the Java sound API (Google is your friend) .

But why do you need to do this. It won't result in improved sound quality since although you would have 16 bit samples it would still only effectively be 8 bit sample quality.
Rajitha Gunawardhane
Greenhorn

Joined: Dec 11, 2007
Posts: 28
Richard Tookey wrote:
Rajitha Gunawardhane wrote:
I wanted to convert an 8bit wav file to 16bit file.


Not trivial but can be done using the Java sound API (Google is your friend) .

But why do you need to do this. It won't result in improved sound quality since although you would have 16 bit samples it would still only effectively be 8 bit sample quality.


I could not find with my Friend yet . The reason is i have a audio client that has only process 16 bit files.

A help is really appreciated.

Thank you.
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 960
    
  10

Rajitha Gunawardhane wrote:[ The reason is i have a audio client that has only process 16 bit files.


You don't need a Java program then. Why not just use something like Audacity .
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: 8bit to 16bit conversion.
 
Similar Threads
byte to char casting
comparison
Short and Byte best practice
Is there any API to allow my app compile an user code and show me the log?
Null teminating a string