Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you find supported audio formats for the mic?



In AudioSystem there is a static method

static AudioFormat[] getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) 

          Obtains the formats that have a particular encoding and that the system can obtain from a stream of the specified format using the set of installed format converters.

from the javadoc


- Tom




On 22-Jun-05, at 12:09 PM, Aaron Roberts wrote:

I am working with audio and discovered that the supported audio format
changes quite a bit between OSes (Mac, Win, Lin)  and hardware.

If I have the following -

AudioFormat audioFormat = new AudioFormat(44100, 16, 1, true, false);
DataLine.Info info = new DataLine.Info(TargetDataLine.class, audioFormat);
TargetDataLine targetDataLine =  (TargetDataLine) AudioSystem.getLine(info);


It works some places, but not others.  I'll get an unsupported format
exception when calling AudioSystem.getLine().  On my Mac, only the
44100 rate seems to work.

How can I find out what formats are supported?

Cheers,
Aaron R>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >How do you find supported audio formats for the mic? (From: Aaron Roberts <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.