• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Audio Capture (Java)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Audio Capture (Java)


  • Subject: Audio Capture (Java)
  • From: Zachary Crockett <email@hidden>
  • Date: Sun, 21 Jul 2002 18:18:34 -0500

Hey there all, another core audio newbie needs help...

I'm writing a Java app to capture audio, modify it through a UI, and stream it out. I completed the project using Java Sound, later found out that's currently unsupported, so back I went to the drawing board. (I'm glad to hear someone else say the docs for CoreAudio aren't the best.. I've had a heck of a time trying to learn the API.)

After several attempts, I'm stumped -- I'm using the HAL for capture. I get the default input AudioDevice using AudioHardware.getDefaultInputDevice(), and register an AudioDeviceIOProc... However, the inInputData parameter of the IOProc doesn't seem to actually contain anything but near-silence even if I scream and dance around my mic, and no matter whether I use an external mic or the internal one. Here's some sample data:

-0.008362072 -0.00347911
-0.008423109 -0.00347911
-0.008423109 -0.003540147
-0.00839259 -0.0035096286
-0.008423109 -0.0035096286
-0.008423109 -0.0035096286
-0.00839259 -0.00347911
-0.008423109 -0.003540147
-0.00839259 -0.0035096286
-0.008362072 -0.0035096286
-0.008423109 -0.0035096286
-0.008423109 -0.003540147
-0.008423109 -0.0035096286
-0.008423109 -0.0035096286
-0.00839259 -0.0035096286
-0.00839259 -0.00347911
-0.00839259 -0.00347911

It's all about like that... I thought maybe the small differences were significant, but they wouldn't render any recognizeable sound (using either AudioDeviceOutputUnit.renderSlice, or the default output device and another IOProc... I tried both) even if multiplied by 50000. In case it matters, I'm on a PowerBook G3, OS X 10.1.5.

Thanks for the help, I'm looking forward to being called a moron for forgetting a single simple step... that is, one line of code...
;)
Zac
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Audio Capture (Java)
      • From: "Michael C. Thornburgh" <email@hidden>
  • Prev by Date: Re: 'software' midi destination
  • Next by Date: Setting sample rate
  • Previous by thread: Re: 'software' midi destination
  • Next by thread: Re: Audio Capture (Java)
  • Index(es):
    • Date
    • Thread