# PcmSource

48 kHz, mono, signed 16-bit PCM.

Source: https://socketsvc.vercel.app/zh-TW/api/client/PcmSource
<Callout title="Generated from source">
  Interface `com.socketsvc.client.api.PcmSource` — generated from [PcmSource.java](https://github.com/HippoDev03/SocketSVC/blob/main/client/common/src/main/java/com/socketsvc/client/api/PcmSource.java). Edit the Javadoc in the Java source, then run `pnpm gen:api`.
</Callout>

```java
package com.socketsvc.client.api;

public interface PcmSource extends AutoCloseable { ... }
```

48 kHz, mono, signed 16-bit PCM. A convenience source for feeding [`play`](/api/client/LocalAudioChannel)
frame by frame (e.g. via [`PcmSources`](/api/shared/PcmSources)) - read it on whatever thread you drive playback from,
never the render thread. Fill all 960 samples (20 ms); zero-pad the final partial frame. Return
false at EOF. Reads must finish promptly and respond to interruption.

## Methods

### readFrame

```java
boolean readFrame(short[] samples) throws Exception
```

### close

```java
default void close() throws Exception
```