org.tritonus.lowlevel.alsa
Class AlsaCtl

java.lang.Object
  extended byorg.tritonus.lowlevel.alsa.AlsaCtl

public class AlsaCtl
extends Object

TODO:


Constructor Summary
AlsaCtl(int nCard)
           
AlsaCtl(String strName, int nMode)
          Open a ctl.
 
Method Summary
 int close()
          Calls snd_ctl_close().
static int getCardIndex(String strName)
           
 int getCardInfo(AlsaCtlCardInfo cardInfo)
          Calls snd_ctl_card_info().
static String getCardLongName(int nCard)
           
static String getCardName(int nCard)
           
static int[] getCards()
           
 int[] getPcmDevices()
           
 int getPcmInfo(int[] anValues, String[] astrValues)
          anValues[0] device (inout) anValues[1] subdevice (inout) anValues[2] stream (inout) anValues[3] card (out) anValues[4] class (out) anValues[5] subclass (out) anValues[6] subdevice count (out) anValues[7] subdevice available (out) astrValues[0] id (out) astrValues[1] name (out) astrValues[2] subdevice name (out)
static int loadCard(int nCard)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlsaCtl

public AlsaCtl(String strName,
               int nMode)
        throws Exception
Open a ctl. Objects created with this constructor have to be closed by calling close(). This is necessary to free native resources.

Parameters:
strName - The name of the sound card. For instance, "hw:0", or an identifier you gave the card ("CARD1").
nMode - Special modes for the low-level opening like SND_CTL_NONBLOCK, SND_CTL_ASYNC. Normally, set this to 0.
Throws:
Exception

AlsaCtl

public AlsaCtl(int nCard)
        throws Exception
Throws:
Exception
Method Detail

loadCard

public static int loadCard(int nCard)

getCards

public static int[] getCards()

getCardIndex

public static int getCardIndex(String strName)

getCardName

public static String getCardName(int nCard)

getCardLongName

public static String getCardLongName(int nCard)

close

public int close()
Calls snd_ctl_close().


getCardInfo

public int getCardInfo(AlsaCtlCardInfo cardInfo)
Calls snd_ctl_card_info().


getPcmDevices

public int[] getPcmDevices()

getPcmInfo

public int getPcmInfo(int[] anValues,
                      String[] astrValues)
anValues[0] device (inout) anValues[1] subdevice (inout) anValues[2] stream (inout) anValues[3] card (out) anValues[4] class (out) anValues[5] subclass (out) anValues[6] subdevice count (out) anValues[7] subdevice available (out) astrValues[0] id (out) astrValues[1] name (out) astrValues[2] subdevice name (out)