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: Synthetic sound



Change the  16000 in the following line:
                        shortBuffer.put((short)(16000*sinWave));

to something much smaller (like 100). Apparently with the amplitude too high there is a lot of clipping going on. I'm not familiar with the Java audio so I don't know if there is somewhere else in the Audio System that you can attenuate the amplitude.

Also, it seems that where you write data from playBuffer into sourceInputLine you need to check if there is available space.


Bruce A. Johnson, One Moon Scientific, Inc.

_______________________________________________
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


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.