<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/jsresources/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/jsresources/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 31 Dec 2009 16:21:36 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/jsresources/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>MixingAudioInputStream does not indicate end of stream.</title><link>https://sourceforge.net/p/jsresources/bugs/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Writing a given MixingAudioInputStream to a file with AudioSystem.write(AudioInputStream stream, AudioFileFormat.Type t, File f) never terminates.&lt;br /&gt;
public int read(byte[] abData, int nOffset, int nLength) method never returns -1 to indicate end of all streams.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Thu, 31 Dec 2009 16:21:36 -0000</pubDate><guid>https://sourceforge.net3aad463376aff320ab076eb9c0628460b480e49e</guid></item><item><title>AudioCovnerter ulaw to alaw conversion error</title><link>https://sourceforge.net/p/jsresources/bugs/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Trying to convert a mu-law (ULAW) wav file to a-law I&lt;br /&gt;
get a "format conversion not supported" error, details:&lt;br /&gt;
Source in.wav:&lt;br /&gt;
Type: WAVE&lt;br /&gt;
AudioFormat: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame&lt;br /&gt;
AudioConverter arguments:&lt;br /&gt;
"-e ALAW -f 8000 in.wav out.wav"&lt;/p&gt;
&lt;p&gt;Following seems to work:&lt;br /&gt;
Change AudioCovnerter.java line nr +/- 321 (in method&lt;br /&gt;
main()):&lt;br /&gt;
        /* Step 1: convert to PCM, if necessary.&lt;br /&gt;
        */&lt;br /&gt;
        if (! AudioCommon.isPcm(format.getEncoding()))&lt;/p&gt;
&lt;p&gt;New code:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="o"&gt;/\*&lt;/span&gt; &lt;span class="n"&gt;Step&lt;/span&gt; 1&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;convert&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;PCM&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;necessary&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="o"&gt;\*/&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;(!format.getEncoding().equals(AudioFormat.Encoding.ULAW)&lt;br /&gt;
&amp;amp;&amp;amp; ! AudioCommon.isPcm(format.getEncoding()))&lt;/p&gt;
&lt;p&gt;Mostapha al Mourabit&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 31 Oct 2006 11:42:36 -0000</pubDate><guid>https://sourceforge.net709ee4223d97c2a65c0db34c547127c6e76a5eab</guid></item><item><title>Clipping in OscillatorPlayer</title><link>https://sourceforge.net/p/jsresources/bugs/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you for making your Java Source Resourses&lt;br /&gt;
available.  The Web page&lt;br /&gt;
&lt;a href="http://www.jsresources.org/examples/" rel="nofollow"&gt;http://www.jsresources.org/examples/&lt;/a&gt;&lt;br /&gt;
OscillatorPlayer.html&lt;br /&gt;
states that this program has a bug; namely:&lt;br /&gt;
Full-scale waves can lead to clipping.  It is&lt;br /&gt;
currently not known which component is responsible&lt;br /&gt;
for this.&lt;br /&gt;
The problem is caused by line 82 of the file&lt;br /&gt;
Oscillator.java:&lt;br /&gt;
fAmplitude = (float) (fAmplitude *&lt;br /&gt;
Math.pow(2, getFormat().getSampleSizeInBits()&lt;br /&gt;
- 1));&lt;br /&gt;
For a "full-scale wave"--i.e., fAmplitude originally&lt;br /&gt;
1--the new value of fAmplitude that results from this&lt;br /&gt;
line is&lt;br /&gt;
Math.pow(2, getFormat().getSampleSizeInBits() - 1))&lt;br /&gt;
--viz., 2 raised to the power&lt;br /&gt;
getFormat().getSampleSizeInBits() - 1.&lt;br /&gt;
Roughly put, the subtraction of 1 here has the desired&lt;br /&gt;
effect allotting half of the quantization levels to&lt;br /&gt;
the positive values of the signal, and the other half&lt;br /&gt;
to the negative values; however, it does not account&lt;br /&gt;
for a quantization level also being allotted to a&lt;br /&gt;
signal level of zero.  Accordingly, either the&lt;br /&gt;
positive or negative half of the quantizer actually&lt;br /&gt;
has one fewer level allotted to it.  A simple fix is&lt;br /&gt;
to scale the signal into the quantizer as if both&lt;br /&gt;
positive and negative signal values are allotted one&lt;br /&gt;
fewer level; that is, replace line 82 with&lt;br /&gt;
fAmplitude = (float) (fAmplitude *&lt;br /&gt;
(Math.pow(2, getFormat().getSampleSizeInBits()&lt;br /&gt;
- 1) - 1));&lt;br /&gt;
I have tested this modification with fAmplitude = 1,&lt;br /&gt;
and no distortion results.&lt;/p&gt;
&lt;p&gt;By the way, the headers of both of the files&lt;br /&gt;
OscillatorPlayer.java and Oscillator.java state "this&lt;br /&gt;
code is formatted to fit into 80 columns"; but, it is&lt;br /&gt;
easily seen that this is not the case.&lt;/p&gt;
&lt;p&gt;Jerome Breitenbach&lt;br /&gt;
jbreiten@calpoly.edu&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 05 Sep 2006 22:08:21 -0000</pubDate><guid>https://sourceforge.net8839ef9b1e0026cf239083945c6db6e9ad550f18</guid></item><item><title>midiplayer resources incomplete</title><link>https://sourceforge.net/p/jsresources/bugs/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When I start the midiplayer I get error messages like&lt;/p&gt;
&lt;p&gt;Fatal error: resource key toggleChannelViewAction not&lt;br /&gt;
found. You may need to override the locale&lt;/p&gt;
&lt;p&gt;I tried german and US locale, the missing properties&lt;br /&gt;
differ but it seems both resources are incomplete.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andreas Voss</dc:creator><pubDate>Mon, 21 Feb 2005 07:22:57 -0000</pubDate><guid>https://sourceforge.net7010177a0e6a68875371162f0f9ea978a2264964</guid></item></channel></rss>