com.softsynth.jsyn
Class AudioDevice

java.lang.Object
  extended by com.softsynth.jsyn.AudioDevice

public class AudioDevice
extends java.lang.Object

Provides information on the enumerated audio devices that are available for use. You can query the available devices and then pass a selected deviceID to Synth.start().

Version:
JSyn Version 142
Author:
(C) 2001 Phil Burk, SoftSynth.com, All Rights Reserved
See Also:
Synth, SynthContext

Constructor Summary
AudioDevice()
           
 
Method Summary
static int getDefaultInputDeviceID()
          Query the index of the default device.
static int getDefaultOutputDeviceID()
           
static int getMaxInputChannels(int deviceID)
          Return the maximum number of channels that can be requested for a given device.
static int getMaxOutputChannels(int deviceID)
           
static java.lang.String getName(int deviceID)
          Return the human readable name for a given audio device.
static int getNumDevices()
          Query the total number of audio hardware devices available.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioDevice

public AudioDevice()
Method Detail

getNumDevices

public static int getNumDevices()
Query the total number of audio hardware devices available. You must initialize() a SynthContext before calling this method.


getDefaultInputDeviceID

public static int getDefaultInputDeviceID()
Query the index of the default device. This is often selected by an audio control panel that is supplied with the operating system. This is the device that will be used if start() is called without specifying a device.


getDefaultOutputDeviceID

public static int getDefaultOutputDeviceID()

getMaxInputChannels

public static int getMaxInputChannels(int deviceID)
Return the maximum number of channels that can be requested for a given device. You can specify the number of channels when calling start().


getMaxOutputChannels

public static int getMaxOutputChannels(int deviceID)

getName

public static java.lang.String getName(int deviceID)
Return the human readable name for a given audio device. This is useful when presenting the user with a menu of device choices.

See "JSynExamples.TJ_Devices" for an example.