• 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
Re: AudioStream names in Java
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioStream names in Java


  • Subject: Re: AudioStream names in Java
  • From: Michael Hopkins <email@hidden>
  • Date: Thu, 15 Aug 2002 10:18:03 -0700

Gerd,

As Jeff mentioned, the streams are usually not named. They are identified by
Stream 1, Stream 2, etc. The best way to identify them is by the format.

I don't think that using the stream is the best way to get information (such
as the name). You should probably use an AudioStreamDescription object.

Do something like this:

public static AudioStreamDescription
getPhysicalDescriptionFromStream(AudioStream stream) throws CAException
{
AudioStreamDescription desc = new AudioStreamDescription();
int size = stream.getPropertyInfoSize (0,
AHConstants.kAudioStreamPropertyPhysicalFormat);
size = stream.getProperty(0,
AHConstants.kAudioStreamPropertyPhysicalFormat, desc);
return desc;
}

Once you have an AudioStreamDescription, you can display information about
it such as the sample rate, the number of bits per channel, the format, etc.
All these calls are made from the AudioStreamDescription object.

Hope this helps!

-Michael



On 8/14/02 10:00 PM, "email@hidden" >
> Hi,
>
> I hate to pose such simple questions, but I don't get it:
>
> if
>
> AudioStream[] streams = aDevice.getInputStreams()
>
> returns more than one stream, how do I get the name of
> the streams? A name the user can understand and choose?
>
> Even AudioStream.toString() isn't overridden to return something
> meaningful.
>
> Thanks,
> Gerd
_______________________________________________
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.

  • Prev by Date: inOutputTime accuracy?
  • Next by Date: Re: MIDI timer resolution
  • Previous by thread: Re: AudioStream names in Java
  • Next by thread: debug flag left on in MIDIMan OSX driver
  • Index(es):
    • Date
    • Thread