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 LineEvent

  • All Implemented Interfaces:
    Serializable

    public class LineEvent
    extends EventObject
    The LineEvent class encapsulates information that a line sends its listeners whenever the line opens, closes, starts, or stops. Each of these four state changes is represented by a corresponding type of event. A listener receives the event as a parameter to its update method. By querying the event, the listener can learn the type of event, the line responsible for the event, and how much data the line had processed when the event occurred.

    Although this class implements Serializable, attempts to serialize a LineEvent object will fail.

    Since:
    1.3
    See Also:
    Line, LineListener.update(javax.sound.sampled.LineEvent)
    • Constructor Detail

      • LineEvent

        public LineEvent(Line line,
                 LineEvent.Type type,
                 long position)
        Constructs a new event of the specified type, originating from the specified line.
        Parameters:
        line - the source of this event
        type - the event type (OPEN, CLOSE, START, or STOP)
        position - the number of sample frames that the line had already processed when the event occurred, or AudioSystem.NOT_SPECIFIED
        Throws:
        IllegalArgumentException - if line is null.
    • Method Detail

      • getLine

        public final Line getLine()
        Obtains the audio line that is the source of this event.
        Returns:
        the line responsible for this event
      • getFramePosition

        public final long getFramePosition()
        Obtains the position in the line's audio data when the event occurred, expressed in sample frames. For example, if a source line had already played back 14 sample frames at the time it was paused, the pause event would report the line's position as 14. The next frame to be processed would be frame number 14 using zero-based numbering, or 15 using one-based numbering.

        Note that this field is relevant only to certain events generated by data lines, such as START and STOP. For events generated by lines that do not count sample frames, and for any other events for which this value is not known, the position value should be AudioSystem.NOT_SPECIFIED.

        Returns:
        the line's position as a sample frame number
      • toString

        public String toString()
        Obtains a string representation of the event. The contents of the string may vary between implementations of Java Sound.
        Overrides:
        toString in class EventObject
        Returns:
        a string describing the event.

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/lineevent.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