PcmSources - SocketSVC Docs
SocketSVC Docs

PcmSources

Class PcmSources in com.socketsvc.client.api

Generated from source

Class com.socketsvc.client.api.PcmSources — generated from PcmSources.java. Edit the Javadoc in the Java source, then run pnpm gen:api.

package com.socketsvc.client.api;

public final class PcmSources { ... }

Methods

file

public static PcmSource file(Path path)

Lazily opens a local sound file (WAV, AIFF, ...) using Java Sound and converts to 48 kHz mono PCM. Unsupported file/conversion errors are reported by AudioPlayer.completion(). No network I/O.

stream

public static PcmSource stream(InputStream in)

As #file(Path), but reads from an already-open stream (e.g. a mod's bundled resource). The stream is closed once playback ends, whether by EOF, stop() or a read failure.

On this page

View as Markdown

Ask about this page