MCPcopy Create free account
hub / github.com/Monibuca/engine / NewOpus

Function NewOpus

track/opus.go:12–23  ·  view source on GitHub ↗
(puber IPuber, stuff ...any)

Source from the content-addressed store, hash-verified

10var _ SpesificTrack = (*Opus)(nil)
11
12func NewOpus(puber IPuber, stuff ...any) (opus *Opus) {
13 opus = &Opus{}
14 opus.CodecID = codec.CodecID_OPUS
15 opus.SampleSize = 16
16 opus.Channels = 2
17 opus.AVCCHead = []byte{(byte(opus.CodecID) << 4) | (1 << 1)}
18 opus.SetStuff("opus", uint32(48000), byte(111), opus, stuff, puber)
19 if opus.BytesPool == nil {
20 opus.BytesPool = make(util.BytesPool, 17)
21 }
22 return
23}
24
25type Opus struct {
26 Audio

Callers 1

CreateAudioTrackMethod · 0.92

Calls 1

SetStuffMethod · 0.65

Tested by

no test coverage detected