-
Notifications
You must be signed in to change notification settings - Fork 1
/
opus-php.stubs.php
52 lines (44 loc) · 1.32 KB
/
opus-php.stubs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
// Stubs for opus-php
namespace {
const OPUS_APPLICATION_VOIP = null;
const OPUS_APPLICATION_AUDIO = null;
const OPUS_APPLICATION_LOW_DELAY = null;
/**
* Retrieves the version of Opus that `opus-php` is using.
*
* @return string
*/
function opus_version(): string {}
/**
* Encodes 16-bit PCM audio data into Opus frames.
*/
class OpusEncoder {
/**
* Creates a new opus encoder.
*
* @param int $sample_rate Sample rate of the encoder.
* @param int $channels Number of channels of the encoder.
* @param int $application Application used by the encoder.
*
* @return OpusEncoder
*/
public function __construct(int $sample_rate, int $channels, int $application) {}
/**
* Sets the bitrate of the Opus encoder.
*
* @param int $bitrate Bitrate of the encoder.
*/
public function setBitrate(int $bitrate): mixed {}
/**
* Encodes 16-bit PCM into an Opus frame.
*
* If the encoder is set up for dual channels, the input must be interleaved.
*
* @param int[] $input Input 16-bit PCM frame.
*
* @return int[]
*/
public function encode(array $input): array {}
}
}