Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
javax.sound.sampled

Class DataLine.Info

  • Enclosing interface:
    DataLine

    public static class DataLine.Info
    extends Line.Info
    Besides the class information inherited from its superclass, DataLine.Info provides additional information specific to data lines. This information includes:
    • the audio formats supported by the data line
    • the minimum and maximum sizes of its internal buffer
    Because a Line.Info knows the class of the line its describes, a DataLine.Info object can describe DataLine subinterfaces such as SourceDataLine, TargetDataLine, and Clip. You can query a mixer for lines of any of these types, passing an appropriate instance of DataLine.Info as the argument to a method such as Mixer.getLine(Line.Info).
    Since:
    1.3
    See Also:
    Line.Info
    • Constructor Detail

      • DataLine.Info

        public DataLine.Info(Class<?> lineClass,
                     AudioFormat[] formats,
                     int minBufferSize,
                     int maxBufferSize)
        Constructs a data line's info object from the specified information, which includes a set of supported audio formats and a range for the buffer size. This constructor is typically used by mixer implementations when returning information about a supported line.
        Parameters:
        lineClass - the class of the data line described by the info object
        formats - set of formats supported
        minBufferSize - minimum buffer size supported by the data line, in bytes
        maxBufferSize - maximum buffer size supported by the data line, in bytes
      • DataLine.Info

        public DataLine.Info(Class<?> lineClass,
                     AudioFormat format,
                     int bufferSize)
        Constructs a data line's info object from the specified information, which includes a single audio format and a desired buffer size. This constructor is typically used by an application to describe a desired line.
        Parameters:
        lineClass - the class of the data line described by the info object
        format - desired format
        bufferSize - desired buffer size in bytes
      • DataLine.Info

        public DataLine.Info(Class<?> lineClass,
                     AudioFormat format)
        Constructs a data line's info object from the specified information, which includes a single audio format. This constructor is typically used by an application to describe a desired line.
        Parameters:
        lineClass - the class of the data line described by the info object
        format - desired format
    • Method Detail

      • getFormats

        public AudioFormat[] getFormats()
        Obtains a set of audio formats supported by the data line. Note that isFormatSupported(AudioFormat) might return true for certain additional formats that are missing from the set returned by getFormats(). The reverse is not the case: isFormatSupported(AudioFormat) is guaranteed to return true for all formats returned by getFormats(). Some fields in the AudioFormat instances can be set to NOT_SPECIFIED if that field does not apply to the format, or if the format supports a wide range of values for that field. For example, a multi-channel device supporting up to 64 channels, could set the channel field in the AudioFormat instances returned by this method to NOT_SPECIFIED.
        Returns:
        a set of supported audio formats.
        See Also:
        isFormatSupported(AudioFormat)
      • isFormatSupported

        public boolean isFormatSupported(AudioFormat format)
        Indicates whether this data line supports a particular audio format. The default implementation of this method simply returns true if the specified format matches any of the supported formats.
        Parameters:
        format - the audio format for which support is queried.
        Returns:
        true if the format is supported, otherwise false
        See Also:
        getFormats(), AudioFormat.matches(javax.sound.sampled.AudioFormat)
      • getMinBufferSize

        public int getMinBufferSize()
        Obtains the minimum buffer size supported by the data line.
        Returns:
        minimum buffer size in bytes, or AudioSystem.NOT_SPECIFIED
      • getMaxBufferSize

        public int getMaxBufferSize()
        Obtains the maximum buffer size supported by the data line.
        Returns:
        maximum buffer size in bytes, or AudioSystem.NOT_SPECIFIED
      • matches

        public boolean matches(Line.Info info)
        Determines whether the specified info object matches this one. To match, the superclass match requirements must be met. In addition, this object's minimum buffer size must be at least as large as that of the object specified, its maximum buffer size must be at most as large as that of the object specified, and all of its formats must match formats supported by the object specified.
        Overrides:
        matches in class Line.Info
        Parameters:
        info - the info object which is being compared to this one
        Returns:
        true if this object matches the one specified, otherwise false.
      • toString

        public String toString()
        Obtains a textual description of the data line info.
        Overrides:
        toString in class Line.Info
        Returns:
        a string description

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/sound/sampled/DataLine.Info.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut