1 2 3 Previous Next 36 Replies Latest reply on Oct 26, 2010 5:13 PM by captfoss Go to original post
      • 30. Re: JavaSound questions
        Will Pittenger
        Unfortunately, the only physical machine I have runs 64-bit Vista. I do have a 32-bit Ubuntu VM, but it has no real hardware to record from. My client probably does have some 32-bit computers. I know he has been attempting to get it running on Unix and Red Hat. Probably also Windows. But he hasn't given me any more details of his machines. I am looking into traveling to work there (about an 1.5 hours away). But I don't know when that will happen.

        BTW: Communications here are currently flaky due to wireless networking issues. This computer, but only this one, has problems getting bandwidth. So if I don't respond quickly, that would probably be the problem.
        • 31. Re: JavaSound questions
          Will Pittenger
          I had my client sudo the Java program on his Red Hat machine with no effect. He has told me it is 32-bit. He is also getting static in the recording. I am heading there tomorrow afternoon. He also has access to some Windows 7 machines. I don't know if those are 32-bit or 64-bit.
          • 32. Re: JavaSound questions
            captfoss
            What all, exactly, is your program doing at this point?
            • 33. Re: JavaSound questions
              Will Pittenger
              Doing? Well, as you recall, you told me to use a temp buffer to store the sound and then send it through a pipe to AudioSystem.write. That is how my code works. However, I thought I could specify PCM_SIGNED for the port and ULAW later to write. I figured that would cause it to transcode the audio data. However, that produced the static. I switched back to just writing PCM_SIGNED and the static is gone. I haven't been able to run the program yet somewhere with hardware I can record from yet here at the university.
              • 34. Re: JavaSound questions
                captfoss
                Will Pittenger wrote:
                Doing? Well, as you recall, you told me to use a temp buffer to store the sound and then send it through a pipe to AudioSystem.write. That is how my code works. However, I thought I could specify PCM_SIGNED for the port and ULAW later to write. I figured that would cause it to transcode the audio data. However, that produced the static. I switched back to just writing PCM_SIGNED and the static is gone. I haven't been able to run the program yet somewhere with hardware I can record from yet here at the university.
                Ummmm... you should, theoretically, be able to transcode if you did this...
                byte[] pcmDataArray = whatever...
                AudioFormat pcmFormat = whatever...
                
                ByteArrayInputStream bais = new ByteArrayInputStream(pcmDataArray);
                AudioInputStream ais = new AudioInputStream(bais, pcmFormat, (long)(pcmDataArray.length / pcmFormat.getFrameSize()));
                
                AudioFormat.Encoding     targetEncoding = AudioFormat.Encoding.ULAW;
                AudioInputStream     ulawAudioInputStreamAIS = AudioSystem.getAudioInputStream(targetEncoding, ais);
                AudioFileFormat.Type     fileType = AudioFileFormat.Type.WAVE;
                AudioSystem.write(ulawAudioInputStreamAIS, fileType, ulawFile);
                • 35. Re: JavaSound questions
                  Will Pittenger
                  At this point, I think the client decided it wasn't worth it. We are concentrating on ensuring we get a microphone.
                  • 36. Re: JavaSound questions
                    captfoss
                    Will Pittenger wrote:
                    We are concentrating on ensuring we get a microphone.
                    Well, you have the code for that, it just may not work on your target system ;-)
                    1 2 3 Previous Next