Mailing Lists: Apple Mailing Lists

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

FW: listening for sound



Mike

You could use the SPBDevice object and then turn its
'setLevelMeterOnOff(true);' from there you can get the sound input level of
that Device using 'getLevelMeterLevel()'. From there u could just see if the
level is over a level u feel is not real sound. This can be a bit tricky I
use an array look up list, that I update over looking for an average level.

There is also the new 'getActiveLevels()[0]' and 'getActiveLevels()[1]' this
will give you the stereo levels on the Mac. Never got it to work on the PC.

When it comes to OSX there is no way of setting the device you wish to track
as of yet. OSX just returns one device for everything built into your
computer. If you wish to track the levels of a CD mind you can just treat it
as Audio media (very nice).

Good luck, and it can be done :). Have you looked at CoreAudio? When the
sound comes into the computer u can do silly effects to it. Very very very
cool.

aNt

> Mike,
>
> There is no API service for doing this.
>
> However you can use the record to memory code in the SDK - you'd then have
> to pass through the sample data and do this monitoring yourself..
>
> Bill
>
>> From: Mike Campbell <email@hidden>
>> Date: Fri, 07 Dec 2001 00:45:36 -0800
>> To: email@hidden
>> Subject: listening for sound
>>
>> I would like to build a Java application that listens on a sound channel
>> until
>> it "hears" activity and then begins recording to a file. It would continue
>> recording until it encountered a period of non-activity (ie silence). Is
>> this
>> possible using Quicktime for Java? I already know how to record sound to a
>> file, but I don't know if it's possible to listen for activity on a sound
>> channel.
>>
>> If so, can you point me towards the right place in the documentation? I
>> can't
>> seem to find anything about this in there.


------ End of Forwarded Message




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.