Re: CoreAudio Introduction?
Re: CoreAudio Introduction?
- Subject: Re: CoreAudio Introduction?
- From: Daniel Staudigel <email@hidden>
- Date: Mon, 17 Jun 2002 22:47:12 -0700
OK, Daniel (tries to stay calm with myself), READ UP ON YOUR JAVA.
Got the code working, for alla j00 interested.
//
// DiscoverAudioDevices.java
//
import java.util.*;
import com.apple.audio.*;
public class DiscoverAudioDevices {
public static void main (String args[]) {
//com.apple.audio.hardware.AudioHardware hardwareDiscoverer;
//hardwareDiscoverer();
//hardwareDiscoverer =
com.apple.audio.hardware.AudioHardware.Object();
com.apple.audio.hardware.AudioDevice[] devices ;
try {
devices =
com.apple.audio.hardware.AudioHardware.getAudioDevices();
for(int i=0;i < devices.length;i++)
{
System.out.println(devices[0].getName() + '\n');
}
} catch (com.apple.audio.CAException variable)
{
System.out.println("Screwed up... Exiting.\n");
}
}
}
Output:
Built-in audio controller
java has exited with status 0.
Phew. Works great! Now i just need a MIDI source to see if it
registers those.
Erik
On Monday, June 17, 2002, at 10:16 PM, Daniel Staudigel wrote:
I've got some code that i'm testing, based on the documentation... I am
out of practice with Java, so could ya help me out?
//
// DiscoverAudioDevices.java
//
import java.util.*;
import com.apple.audio.*;
public class DiscoverAudioDevices {
public static void main (String args[]) {
com.apple.audio.hardware.AudioHardware hardwareDiscoverer;
com.apple.audio.hardware.AudioDevice * devices;
devices = hardwareDiscoverer.getAudioDevices();
// int i = 0;
// for(i;devices[i] != '\0';i++)
// {
System.out.println(devices[0].getName());
// }
}
}
sorry for the n00b question....
Daniel
On Monday, June 17, 2002, at 08:07 PM, Daniel Staudigel wrote:
Where can I find a basic tutorial/intro with full explanations of
CoreAudio? It seems pretty easy looking at the documentation, but I
have no clue how to start, what the basic structure is behind it, or
anything.
Daniel Staudigel
_______________________________________________
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.
_______________________________________________
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.